summaryrefslogtreecommitdiff
path: root/source3/lib/system_smbd.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-04-02 19:45:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:52 -0500
commite4998337e75c5e9debe914ff4eb2c0b0fa97c156 (patch)
tree3b1aa826088fae703ed4cf590c8bfbd4a865d492 /source3/lib/system_smbd.c
parent186f442f4cd4a8434c4e2d4e2c0de97b855c5586 (diff)
downloadsamba-e4998337e75c5e9debe914ff4eb2c0b0fa97c156.tar.gz
samba-e4998337e75c5e9debe914ff4eb2c0b0fa97c156.tar.bz2
samba-e4998337e75c5e9debe914ff4eb2c0b0fa97c156.zip
r14868: I will not write code when changing to Daylight Savings Time.
I will not write code when changing to Daylight Savings Time. I will not write code when changing to Daylight Savings Time. I will not write code when changing to Daylight Savings Time. I will not write code when changing to Daylight Savings Time. I will not write code when changing to Daylight Savings Time. I will not write code when changing to Daylight Savings Time. I will not write code when changing to Daylight Savings Time. I will not write code when changing to Daylight Savings Time. ... Fix my brain dead inverted logic for turning winbindd on and off when run on a DC or when calling pdb functions from within winbindd. (This used to be commit 021b3dc2db9fb422ede4657a1f27ef7ef2d22cee)
Diffstat (limited to 'source3/lib/system_smbd.c')
-rw-r--r--source3/lib/system_smbd.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/source3/lib/system_smbd.c b/source3/lib/system_smbd.c
index ac7a096295..afa64489cf 100644
--- a/source3/lib/system_smbd.c
+++ b/source3/lib/system_smbd.c
@@ -132,13 +132,7 @@ static int sys_getgrouplist(const char *user, gid_t gid, gid_t *groups, int *grp
* always determined by the info3 coming back from auth3 or the
* PAC. */
- if ( !winbind_putenv("0") ) {
- DEBUG(0,("sys_getgroup_list: Insufficient environment space "
- "for %s\n", WINBINDD_DONT_ENV));
- } else {
- DEBUG(10,("sys_getgrouplist(): disabled winbindd for group "
- "lookup [user == %s]\n", user));
- }
+ winbind_off() ;
#ifdef HAVE_GETGROUPLIST
retval = getgrouplist(user, gid, groups, grpcnt);
@@ -148,10 +142,12 @@ static int sys_getgrouplist(const char *user, gid_t gid, gid_t *groups, int *grp
unbecome_root();
#endif
- /* allow winbindd lookups */
+ /* allow winbindd lookups , but only if they were not already disabled */
+
+ if ( !(winbindd_env && strequal(winbindd_env, "1")) ) {
+ winbind_on();
+ }
- winbind_putenv( winbindd_env ? winbindd_env : "1" );
-
return retval;
}