diff options
author | Gerald Carter <jerry@samba.org> | 2006-10-26 14:57:11 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2006-10-26 14:57:11 +0000 |
commit | 47dde11977c259e804ae67f1507d0e2f7e8263fc (patch) | |
tree | 68f478569486c25986b003fd62b5b0d40819435f /source/lib/system_smbd.c | |
parent | 6cd6987fc504a8056295113c12f629ad5c4b2868 (diff) | |
download | samba-47dde11977c259e804ae67f1507d0e2f7e8263fc.tar.gz samba-47dde11977c259e804ae67f1507d0e2f7e8263fc.tar.xz samba-47dde11977c259e804ae67f1507d0e2f7e8263fc.zip |
r19499: sync up changes for 3.0.23d
Diffstat (limited to 'source/lib/system_smbd.c')
-rw-r--r-- | source/lib/system_smbd.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/source/lib/system_smbd.c b/source/lib/system_smbd.c index afa64489cfd..fc506c901db 100644 --- a/source/lib/system_smbd.c +++ b/source/lib/system_smbd.c @@ -120,19 +120,15 @@ static int getgrouplist_internals(const char *user, gid_t gid, gid_t *groups, static int sys_getgrouplist(const char *user, gid_t gid, gid_t *groups, int *grpcnt) { int retval; - char *winbindd_env; + BOOL winbind_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_env = winbind_env_set(); + winbind_off(); #ifdef HAVE_GETGROUPLIST retval = getgrouplist(user, gid, groups, grpcnt); @@ -142,9 +138,8 @@ static int sys_getgrouplist(const char *user, gid_t gid, gid_t *groups, int *grp unbecome_root(); #endif - /* allow winbindd lookups , but only if they were not already disabled */ - - if ( !(winbindd_env && strequal(winbindd_env, "1")) ) { + /* allow winbindd lookups, but only if they were not already disabled */ + if (!winbind_env) { winbind_on(); } |