summaryrefslogtreecommitdiff
path: root/source3/smbwrapper
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbwrapper')
-rw-r--r--source3/smbwrapper/shared.c20
-rw-r--r--source3/smbwrapper/smbsh.c2
2 files changed, 2 insertions, 20 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 2cbdc76de1..221c6d87c2 100644
--- a/source3/smbwrapper/smbsh.c
+++ b/source3/smbwrapper/smbsh.c
@@ -101,7 +101,7 @@ int main(int argc, char *argv[])
smbw_setshared(line, wd);
slprintf(line,sizeof(line)-1,"%s/smbwrapper.so", libd);
- setenv("LD_PRELOAD", line);
+ setenv("LD_PRELOAD", line, 1);
slprintf(line,sizeof(line)-1,"%s/smbwrapper.32.so", libd);