summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/wb_common.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source3/nsswitch/wb_common.c b/source3/nsswitch/wb_common.c
index f146391653..40221b69fe 100644
--- a/source3/nsswitch/wb_common.c
+++ b/source3/nsswitch/wb_common.c
@@ -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;
+}