diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-09-13 14:14:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:30:43 -0500 |
commit | 52936b1c86afcc6a317807a7e1ad6421b2e09379 (patch) | |
tree | 86a863c4c036dde8fd06cefbb9a8d716b958aff5 /source3/nsswitch/wb_common.c | |
parent | 85d1b13fbe263ae68a192a94bd8be43fee601348 (diff) | |
download | samba-52936b1c86afcc6a317807a7e1ad6421b2e09379.tar.gz samba-52936b1c86afcc6a317807a7e1ad6421b2e09379.tar.bz2 samba-52936b1c86afcc6a317807a7e1ad6421b2e09379.zip |
r25130: make use only of base types which are provided by libreplace
in winbind client and nss/pam stuff
metze
(This used to be commit 2e13e05fa91788bd128e6940bccc0d2cc7140986)
Diffstat (limited to 'source3/nsswitch/wb_common.c')
-rw-r--r-- | source3/nsswitch/wb_common.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/source3/nsswitch/wb_common.c b/source3/nsswitch/wb_common.c index 809549ffd7..9f02b9b7c7 100644 --- a/source3/nsswitch/wb_common.c +++ b/source3/nsswitch/wb_common.c @@ -24,10 +24,6 @@ #include "winbind_client.h" -BOOL winbind_env_set( void ); -BOOL winbind_off( void ); -BOOL winbind_on( void ); - /* Global variables. These are effectively the client state information */ int winbindd_fd = -1; /* fd for winbindd socket */ @@ -530,16 +526,16 @@ int read_reply(struct winbindd_response *response) return result1 + result2; } -BOOL winbind_env_set( void ) +bool winbind_env_set(void) { char *env; if ((env=getenv(WINBINDD_DONT_ENV)) != NULL) { if(strcmp(env, "1") == 0) { - return True; + return true; } } - return False; + return false; } /* @@ -656,21 +652,14 @@ NSS_STATUS winbindd_priv_request_response(int req_type, enable them ************************************************************************/ -/* Use putenv() instead of setenv() in these functions as not all - environments have the latter. */ - -BOOL winbind_off( void ) +bool winbind_off(void) { - static char *s = CONST_DISCARD(char *, WINBINDD_DONT_ENV "=1"); - - return putenv(s) != -1; + return setenv(WINBINDD_DONT_ENV, "1", 1) != -1; } -BOOL winbind_on( void ) +bool winbind_on(void) { - static char *s = CONST_DISCARD(char *, WINBINDD_DONT_ENV "=0"); - - return putenv(s) != -1; + return setenv(WINBINDD_DONT_ENV, "0", 1) != -1; } /************************************************************************* |