From 52936b1c86afcc6a317807a7e1ad6421b2e09379 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 13 Sep 2007 14:14:02 +0000 Subject: 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) --- source3/nsswitch/wb_common.c | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'source3/nsswitch/wb_common.c') 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; } /************************************************************************* -- cgit