summaryrefslogtreecommitdiff
path: root/source3/smbwrapper/smbsh.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-10-23 01:27:23 +0000
committerAndrew Tridgell <tridge@samba.org>1998-10-23 01:27:23 +0000
commit517806e676cdfa43c12e822afd3609dfb1ebe3cb (patch)
tree42d8bad3da4db3d11ef904838b56b81f6fa8ad82 /source3/smbwrapper/smbsh.c
parentd6ad9474b297e900bc3b7576f3b968b0eb70cae4 (diff)
downloadsamba-517806e676cdfa43c12e822afd3609dfb1ebe3cb.tar.gz
samba-517806e676cdfa43c12e822afd3609dfb1ebe3cb.tar.bz2
samba-517806e676cdfa43c12e822afd3609dfb1ebe3cb.zip
fixed problems with PWD - we no longer use the PWD env variable
instead the shared variable area is used. this fixes problems with /bin/sh under solaris (This used to be commit 4eb7b5c6a81447755dfa1be27479027333ed6f26)
Diffstat (limited to 'source3/smbwrapper/smbsh.c')
-rw-r--r--source3/smbwrapper/smbsh.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/smbwrapper/smbsh.c b/source3/smbwrapper/smbsh.c
index b677707741..8c9d00bd98 100644
--- a/source3/smbwrapper/smbsh.c
+++ b/source3/smbwrapper/smbsh.c
@@ -37,7 +37,7 @@ int main(int argc, char *argv[])
{
char *p, *u;
char *libd = BINDIR;
- pstring line;
+ pstring line, wd;
int opt;
extern char *optarg;
extern int optind;
@@ -91,9 +91,11 @@ int main(int argc, char *argv[])
smbw_setenv("PS1", "smbsh$ ");
- sys_getwd(line);
+ sys_getwd(wd);
- smbw_setenv("PWD", line);
+ slprintf(line,sizeof(line)-1,"PWD_%d", getpid());
+
+ smbw_setshared(line, wd);
slprintf(line,sizeof(line)-1,"%s/smbwrapper.so", libd);
smbw_setenv("LD_PRELOAD", line);