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

use putenv() more portably

(This used to be commit dc08f1a5c9)
This commit is contained in:
Andrew Tridgell 1998-10-20 06:51:21 +00:00
parent e4678f5d1d
commit 26b299dd52

View File

@ -139,6 +139,7 @@ char *smbw_getshared(const char *name)
failed:
DEBUG(0,("smbw: shared variables corrupt (%s)\n", strerror(errno)));
exit(1);
return NULL;
}
@ -185,9 +186,14 @@ set an env variable - some systems don't have this
int smbw_setenv(const char *name, const char *value)
{
pstring s;
char *p;
slprintf(s,sizeof(s)-1,"%s=%s", name, value);
return putenv(s);
p = strdup(s);
if (p) p = putenv(p);
return p;
}