summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-03-17 11:54:12 +0000
committerTim Potter <tpot@samba.org>2003-03-17 11:54:12 +0000
commit4b0d05510658bababa46a6161c530193df726b2e (patch)
tree6ebcdf21ae4138d0ab76838ecabdce6021e7bcd6 /source3
parent128e7edaaf7cf6ed590c8b7260303520f7b773a0 (diff)
downloadsamba-4b0d05510658bababa46a6161c530193df726b2e.tar.gz
samba-4b0d05510658bababa46a6161c530193df726b2e.tar.bz2
samba-4b0d05510658bababa46a6161c530193df726b2e.zip
Fix building --with-smbwrapper.
(This used to be commit 1fb5c92bfb96d966a31d5a4d882a411b9c0b497c)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbwrapper/shared.c20
-rw-r--r--source3/smbwrapper/smbsh.c10
2 files changed, 6 insertions, 24 deletions
diff --git a/source3/smbwrapper/shared.c b/source3/smbwrapper/shared.c
index 00dd30b70e..b4cfcf7148 100644
--- a/source3/smbwrapper/shared.c
+++ b/source3/smbwrapper/shared.c
@@ -52,7 +52,7 @@ void smbw_setup_shared(void)
slprintf(s,sizeof(s)-1,"%d", shared_fd);
- smbw_setenv("SMBW_HANDLE", s);
+ setenv("SMBW_HANDLE", s, 1);
return;
@@ -195,24 +195,6 @@ void smbw_setshared(const char *name, const char *val)
/*****************************************************************
-set an env variable - some systems don't have this
-*****************************************************************/
-int smbw_setenv(const char *name, const char *value)
-{
- pstring s;
- char *p;
- int ret = -1;
-
- slprintf(s,sizeof(s)-1,"%s=%s", name, value);
-
- p = strdup(s);
-
- if (p) ret = putenv(p);
-
- return ret;
-}
-
-/*****************************************************************
return true if the passed fd is the SMBW_HANDLE
*****************************************************************/
int smbw_shared_fd(int fd)
diff --git a/source3/smbwrapper/smbsh.c b/source3/smbwrapper/smbsh.c
index d853aa1afc..221c6d87c2 100644
--- a/source3/smbwrapper/smbsh.c
+++ b/source3/smbwrapper/smbsh.c
@@ -92,7 +92,7 @@ int main(int argc, char *argv[])
smbw_setshared("PASSWORD", p);
}
- setenv("PS1", "smbsh$ ");
+ setenv("PS1", "smbsh$ ", 1);
sys_getwd(wd);
@@ -101,18 +101,18 @@ int main(int argc, char *argv[])
smbw_setshared(line, wd);
slprintf(line,sizeof(line)-1,"%s/smbwrapper.so", libd);
- etenv("LD_PRELOAD", line);
+ setenv("LD_PRELOAD", line, 1);
slprintf(line,sizeof(line)-1,"%s/smbwrapper.32.so", libd);
if (file_exist(line, NULL)) {
slprintf(line,sizeof(line)-1,"%s/smbwrapper.32.so:DEFAULT", libd);
- setenv("_RLD_LIST", line);
+ setenv("_RLD_LIST", line, 1);
slprintf(line,sizeof(line)-1,"%s/smbwrapper.so:DEFAULT", libd);
- setenv("_RLDN32_LIST", line);
+ setenv("_RLDN32_LIST", line, 1);
} else {
slprintf(line,sizeof(line)-1,"%s/smbwrapper.so:DEFAULT", libd);
- setenv("_RLD_LIST", line);
+ setenv("_RLD_LIST", line, 1);
}
{