diff options
author | Gerald Carter <jerry@samba.org> | 2006-04-02 19:45:42 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:15:52 -0500 |
commit | 021b3dc2db9fb422ede4657a1f27ef7ef2d22cee (patch) | |
tree | c21b122afa8b76b9ff0725dd3ea1436f8ddf9d8d /source/nsswitch/wb_common.c | |
parent | 1d52ae786d400441d9f5b30b4fa9e4e8ff64f7e4 (diff) | |
download | samba-021b3dc2db9fb422ede4657a1f27ef7ef2d22cee.tar.gz samba-021b3dc2db9fb422ede4657a1f27ef7ef2d22cee.tar.xz samba-021b3dc2db9fb422ede4657a1f27ef7ef2d22cee.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.
Diffstat (limited to 'source/nsswitch/wb_common.c')
-rw-r--r-- | source/nsswitch/wb_common.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source/nsswitch/wb_common.c b/source/nsswitch/wb_common.c index 05f080e73a9..91ec912b7d0 100644 --- a/source/nsswitch/wb_common.c +++ b/source/nsswitch/wb_common.c @@ -618,15 +618,17 @@ NSS_STATUS winbindd_request_response(int req_type, /* Use putenv() instead of setenv() in these functions as not all environments have the latter. */ -BOOL winbind_putenv( const char *s ) +BOOL winbind_off( void ) { - fstring env; + static char *s = CONST_DISCARD(char *, WINBINDD_DONT_ENV "=1"); - if ( !s ) { - return False; - } + return putenv(s) != -1; +} - snprintf( env, sizeof(env), "%s=%s", WINBINDD_DONT_ENV, s ); +BOOL winbind_on( void ) +{ + static char *s = CONST_DISCARD(char *, WINBINDD_DONT_ENV "=0"); - return putenv(env) != -1; + return putenv(s) != -1; } + |