r18218: setenv() is guaranteed by libreplace
authorAndrew Tridgell <tridge@samba.org>
Thu, 7 Sep 2006 11:48:53 +0000 (11:48 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:17:51 +0000 (14:17 -0500)
also, putenv() cannot take a const char *
(This used to be commit 03c9f9dc3668d43983e0e6d7b87d9d3bbf8869f0)

source4/nsswitch/wb_common.c

index f829b55f2a4e2bc3e197e06f9e55dbfb2284caee..e8c317b5982d6c0942598545dcd4c7e0c2bbfc73 100644 (file)
@@ -600,27 +600,14 @@ NSS_STATUS winbindd_request(int req_type,
  enable them
  ************************************************************************/
  
-/* Use putenv() instead of setenv() in these functions as not all
-   environments have the latter. */
-
 BOOL winbind_off( void )
 {
-#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 )
 {
-#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
 }