git.samba.org
/
jerry
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cfcf7cf
)
r25142: Panic if setting the group list fails while switching security
author
James Peach
<jpeach@samba.org>
Fri, 14 Sep 2007 04:17:17 +0000
(
04:17
+0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 17:30:45 +0000
(12:30 -0500)
contexts. Patch from Tim Prouty <tim.prouty@isilon.com>.
source/smbd/sec_ctx.c
patch
|
blob
|
history
diff --git
a/source/smbd/sec_ctx.c
b/source/smbd/sec_ctx.c
index 67b15dc014cb748b2bbd00df1f33c300681c03e7..108d1794c71403b19ffe45e8c93296817d86e60d 100644
(file)
--- a/
source/smbd/sec_ctx.c
+++ b/
source/smbd/sec_ctx.c
@@
-239,7
+239,9
@@
static void set_unix_security_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *grou
/* Start context switch */
gain_root();
#ifdef HAVE_SETGROUPS
- sys_setgroups(gid, ngroups, groups);
+ if (sys_setgroups(gid, ngroups, groups) != 0) {
+ smb_panic("sys_setgroups failed");
+ }
#endif
become_id(uid, gid);
/* end context switch */
@@
-282,6
+284,7
@@
static void set_unix_security_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *grou
DEBUG(0, ("WARNING: failed to set group list "
"(%d groups) for UID %ld: %s\n",
ngroups, uid, strerror(errno)));
+ smb_panic("sys_setgroups failed");
}
become_uid(uid);