summaryrefslogtreecommitdiff
path: root/source4/nsswitch
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-28 13:19:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:55 -0500
commita6ae640313a47ac2950c0948e4385fa934a5ef09 (patch)
tree3cc3cb8ec8c8cec020e85cd28e91c7dba128addf /source4/nsswitch
parente481385391a25c19d82ce93fbec11a973cf82e9f (diff)
downloadsamba-a6ae640313a47ac2950c0948e4385fa934a5ef09.tar.gz
samba-a6ae640313a47ac2950c0948e4385fa934a5ef09.tar.bz2
samba-a6ae640313a47ac2950c0948e4385fa934a5ef09.zip
r3323: more warning reductions
(This used to be commit 5921587ec26e4892efc678421277e4969417d7f5)
Diffstat (limited to 'source4/nsswitch')
-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
}