The Samba-Bugzilla – Attachment 2151 Details for
Bug 4109
smbd fails to restore WINBINDD_DONT_ENV env. var. and fails to communicate with windbindd
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Work around getenv/putenv async
patch-winbind.diff (text/plain), 2.56 KB, created by
Timur Bakeyev
on 2006-09-23 21:06:49 UTC
(
hide
)
Description:
Work around getenv/putenv async
Filename:
MIME Type:
Creator:
Timur Bakeyev
Created:
2006-09-23 21:06:49 UTC
Size:
2.56 KB
patch
obsolete
>--- lib/system_smbd.c.orig Sun Sep 24 02:51:57 2006 >+++ lib/system_smbd.c Sun Sep 24 02:54:19 2006 >@@ -120,19 +120,14 @@ > static int sys_getgrouplist(const char *user, gid_t gid, gid_t *groups, int *grpcnt) > { > int retval; >- char *winbindd_env; > > DEBUG(10,("sys_getgrouplist: user [%s]\n", user)); > >- /* Save the winbindd state and not just blindly turn it back on */ >- >- winbindd_env = getenv(WINBINDD_DONT_ENV); >- > /* This is only ever called for Unix users, remote memberships are > * always determined by the info3 coming back from auth3 or the > * PAC. */ > >- winbind_off() ; >+ winbind_off(); > > #ifdef HAVE_GETGROUPLIST > retval = getgrouplist(user, gid, groups, grpcnt); >@@ -142,9 +137,9 @@ > unbecome_root(); > #endif > >- /* allow winbindd lookups , but only if they were not already disabled */ >+ /* allow winbindd lookups, but only if they were not already disabled */ > >- if ( !(winbindd_env && strequal(winbindd_env, "1")) ) { >+ if ( !winbind_env() ) { > winbind_on(); > } > >--- nsswitch/wb_common.c.orig Sun Sep 24 01:40:30 2006 >+++ nsswitch/wb_common.c Sun Sep 24 02:46:39 2006 >@@ -525,15 +525,11 @@ > NSS_STATUS winbindd_send_request(int req_type, struct winbindd_request *request) > { > struct winbindd_request lrequest; >- char *env; >- int value; >- >+ > /* Check for our tricky environment variable */ > >- if ( (env = getenv(WINBINDD_DONT_ENV)) != NULL ) { >- value = atoi(env); >- if ( value == 1 ) >- return NSS_STATUS_NOTFOUND; >+ if (winbind_env()) { >+ return NSS_STATUS_NOTFOUND; > } > > if (!request) { >@@ -632,3 +628,14 @@ > return putenv(s) != -1; > } > >+BOOL winbind_env( void ) >+{ >+ char *env; >+ >+ if ((env=getenv(WINBINDD_DONT_ENV)) != NULL) { >+ if(strequal(env, "1")) { >+ return True; >+ } >+ } >+ return False; >+} >--- passdb/pdb_interface.c.orig Sun Sep 24 01:51:10 2006 >+++ passdb/pdb_interface.c Sun Sep 24 02:44:29 2006 >@@ -1321,22 +1321,20 @@ > struct group *grp; > char **gr; > struct passwd *pwd; >- char *winbindd_env; > > *pp_uids = NULL; > *p_num = 0; > > /* We only look at our own sam, so don't care about imported stuff */ > >- winbindd_env = getenv(WINBINDD_DONT_ENV); > winbind_off(); > > if ((grp = getgrgid(gid)) == NULL) { > /* allow winbindd lookups, but only if they weren't already disabled */ >- if ( !(winbindd_env && strequal(winbindd_env, "1")) ) { >+ if ( !winbind_env() ) { > winbind_on(); > } >- >+ > return False; > } > >@@ -1363,10 +1361,10 @@ > > /* allow winbindd lookups, but only if they weren't already disabled */ > >- if ( !(winbindd_env && strequal(winbindd_env, "1")) ) { >+ if ( !winbind_env() ) { > winbind_on(); > } >- >+ > return True; > } >
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 4109
:
2151
|
2158
|
2160