diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-02-24 11:24:27 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-02-24 11:24:27 +0000 |
commit | 05262ea49a3d428e015ef71c975231b108847b72 (patch) | |
tree | a109dc049875a26cbf7a67abd2b8dde271b910f8 /source3/smbwrapper | |
parent | 426cd68f74bb0490df54da500d3d9c1ea475e16f (diff) | |
download | samba-05262ea49a3d428e015ef71c975231b108847b72.tar.gz samba-05262ea49a3d428e015ef71c975231b108847b72.tar.bz2 samba-05262ea49a3d428e015ef71c975231b108847b72.zip |
Finish removing setenv replacements from smbwrapper.
(This used to be commit 059ac2d839bf258408490f5ceb786a47cb5acb58)
Diffstat (limited to 'source3/smbwrapper')
-rw-r--r-- | source3/smbwrapper/shared.c | 20 | ||||
-rw-r--r-- | source3/smbwrapper/smbsh.c | 2 |
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); |