summaryrefslogtreecommitdiffstats
path: root/source/nsswitch/wb_common.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-09-13 14:14:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:43 -0500
commit2e13e05fa91788bd128e6940bccc0d2cc7140986 (patch)
tree464763efa5f5879e08424e6eac367d158bc3b9b6 /source/nsswitch/wb_common.c
parentb3ee9adf28ee8136528d0236a3a2c894c2223053 (diff)
downloadsamba-2e13e05fa91788bd128e6940bccc0d2cc7140986.tar.gz
samba-2e13e05fa91788bd128e6940bccc0d2cc7140986.tar.xz
samba-2e13e05fa91788bd128e6940bccc0d2cc7140986.zip
r25130: make use only of base types which are provided by libreplace
in winbind client and nss/pam stuff metze
Diffstat (limited to 'source/nsswitch/wb_common.c')
-rw-r--r--source/nsswitch/wb_common.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/source/nsswitch/wb_common.c b/source/nsswitch/wb_common.c
index 809549ffd7e..9f02b9b7c74 100644
--- a/source/nsswitch/wb_common.c
+++ b/source/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;
}
/*************************************************************************