summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-11-05 17:32:38 +0000
committerTim Potter <tpot@samba.org>2003-11-05 17:32:38 +0000
commit3c31d65d76fc84bfa0fc86c6b775b5afd1f15097 (patch)
tree878cb7bc5602c9d1cd9dab1d06b391b3c675eeb5
parentb216846e8f489e1934b457ebd2bfb1a5b4ae62e4 (diff)
downloadsamba-3c31d65d76fc84bfa0fc86c6b775b5afd1f15097.tar.gz
samba-3c31d65d76fc84bfa0fc86c6b775b5afd1f15097.tar.bz2
samba-3c31d65d76fc84bfa0fc86c6b775b5afd1f15097.zip
Merge of setenv->putenv for winbind client.
(This used to be commit a26d425f93e43641195d0aaf0f9ce5ef0e69f5e1)
-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;
+}