git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0e9a0c
)
don't close high fd's in smbrun when using insure (prevents closing
author
Andrew Tridgell
<tridge@samba.org>
Sun, 23 Apr 2000 08:45:21 +0000
(08:45 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Sun, 23 Apr 2000 08:45:21 +0000
(08:45 +0000)
error fd)
(This used to be commit
defbedd198f02f7bb9af70436f5a25ab754b5fb6
)
source3/lib/smbrun.c
patch
|
blob
|
history
diff --git
a/source3/lib/smbrun.c
b/source3/lib/smbrun.c
index 5a016cd5cd8bc38ba85b843f0e554f58aacfacb2..8d666980b38e818c2af23419e39c2b4fa864f7a3 100644
(file)
--- a/
source3/lib/smbrun.c
+++ b/
source3/lib/smbrun.c
@@
-185,10
+185,12
@@
int smbrun(char *cmd,char *outfile,BOOL shared)
instead use exit codes for debugging */
}
+#ifndef __INSURE__
/* close all other file descriptors, leaving only 0, 1 and 2. 0 and
2 point to /dev/null from the startup code */
for (fd=3;fd<256;fd++) close(fd);
-
+#endif
+
execl("/bin/sh","sh","-c",cmd,NULL);
/* not reached */