The Samba-Bugzilla – Attachment 2731 Details for
Bug 3990
Incorrect handling of group permissions/FreeBSD/setgroups problem
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Cleaned up version of the patch from ML
patch-smbd_sec_ctx.c (text/plain), 1.25 KB, created by
Timur Bakeyev
on 2007-06-02 21:12:34 UTC
(
hide
)
Description:
Cleaned up version of the patch from ML
Filename:
MIME Type:
Creator:
Timur Bakeyev
Created:
2007-06-02 21:12:34 UTC
Size:
1.25 KB
patch
obsolete
>--- smbd/sec_ctx.c.orig Thu Mar 1 05:54:08 2007 >+++ smbd/sec_ctx.c Thu May 31 02:06:39 2007 >@@ -192,7 +192,7 @@ > > if (sec_ctx_stack_ndx == MAX_SEC_CTX_DEPTH) { > DEBUG(0, ("Security context stack overflow!\n")); >- smb_panic("Security context stack overflow!\n"); >+ smb_panic("Security context stack overflow!"); > } > > /* Store previous user context */ >@@ -246,7 +246,14 @@ > gain_root(); > > #ifdef HAVE_SETGROUPS >- sys_setgroups(ngroups, groups); >+ gid_t *new_groups; >+ if (!(new_groups = SMB_MALLOC_ARRAY(gid_t, ngroups+1))) { >+ smb_panic("malloc for groups failed"); >+ } >+ new_groups[0] = gid; >+ memcpy(&new_groups[1], groups, sizeof(gid_t) * ngroups); >+ sys_setgroups(ngroups+1, new_groups); >+ SAFE_FREE(new_groups); > #endif > > ctx_p->ut.ngroups = ngroups; >@@ -262,7 +269,7 @@ > ctx_p->ut.groups = (gid_t *)memdup(groups, > sizeof(gid_t) * ngroups); > if (!ctx_p->ut.groups) { >- smb_panic("memdup failed"); >+ smb_panic("memdup for groups failed"); > } > } else { > ctx_p->ut.groups = NULL; >@@ -315,7 +322,7 @@ > > if (sec_ctx_stack_ndx == 0) { > DEBUG(0, ("Security context stack underflow!\n")); >- smb_panic("Security context stack underflow!\n"); >+ smb_panic("Security context stack underflow!"); > } > > ctx_p = &sec_ctx_stack[sec_ctx_stack_ndx];
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 3990
: 2731