1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r18218: setenv() is guaranteed by libreplace

also, putenv() cannot take a const char *
This commit is contained in:
Andrew Tridgell 2006-09-07 11:48:53 +00:00 committed by Gerald (Jerry) Carter
parent 4ce7b4e45c
commit 03c9f9dc36

View 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
}