Merge of setenv->putenv for winbind client.
authorTim Potter <tpot@samba.org>
Wed, 5 Nov 2003 17:32:38 +0000 (17:32 +0000)
committerTim Potter <tpot@samba.org>
Wed, 5 Nov 2003 17:32:38 +0000 (17:32 +0000)
(This used to be commit a26d425f93e43641195d0aaf0f9ce5ef0e69f5e1)

source3/nsswitch/wb_common.c

index f146391653a19e07cf6a70f5a8bd76f267de7ce5..40221b69feb7d06785f9fafe73a1d079c664616b 100644 (file)
@@ -472,17 +472,23 @@ NSS_STATUS winbindd_request(int req_type,
 }
 
 /*************************************************************************
- A couple of simple jfunctions to disable winbindd lookups and re-
+ A couple of simple functions to disable winbindd lookups and re-
  enable them
  ************************************************************************/
  
+/* Use putenv() instead of setenv() in these functions as not all
+   environments have the latter. */
+
 BOOL winbind_off( void )
 {
-       return (setenv( WINBINDD_DONT_ENV, "1", 1 ) != -1); 
+       static char *s = WINBINDD_DONT_ENV "=1";
+
+       return putenv(s) != -1;
 }
 
 BOOL winbind_on( void )
 {
-       return (setenv( WINBINDD_DONT_ENV, "0", 1 ) != -1); 
-}
+       static char *s = WINBINDD_DONT_ENV "=0";
 
+       return putenv(s) != -1;
+}