From a6ae640313a47ac2950c0948e4385fa934a5ef09 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 28 Oct 2004 13:19:39 +0000 Subject: r3323: more warning reductions (This used to be commit 5921587ec26e4892efc678421277e4969417d7f5) --- source4/nsswitch/wb_common.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'source4/nsswitch') 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 } -- cgit