summaryrefslogtreecommitdiff
path: root/source4/nsswitch/wb_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/nsswitch/wb_common.c')
-rw-r--r--source4/nsswitch/wb_common.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source4/nsswitch/wb_common.c b/source4/nsswitch/wb_common.c
index 2f112e8695..a26e430db4 100644
--- a/source4/nsswitch/wb_common.c
+++ b/source4/nsswitch/wb_common.c
@@ -599,14 +599,22 @@ NSS_STATUS winbindd_request(int req_type,
BOOL winbind_off( void )
{
- static char *s = WINBINDD_DONT_ENV "=1";
-
+#if HAVE_SETENV
+ setenv(WINBINDD_DONT_ENV, "1", 1);
+ return True;
+#else
+ static const char *s = WINBINDD_DONT_ENV "=1";
return putenv(s) != -1;
+#endif
}
BOOL winbind_on( void )
{
- static char *s = WINBINDD_DONT_ENV "=0";
-
+#if HAVE_SETENV
+ setenv(WINBINDD_DONT_ENV, "0", 1);
+ return True;
+#else
+ static const char *s = WINBINDD_DONT_ENV "=0";
return putenv(s) != -1;
+#endif
}