summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-04-23 08:45:21 +0000
committerAndrew Tridgell <tridge@samba.org>2000-04-23 08:45:21 +0000
commit2d96983c7c95e6678ce0851af697535b7a100b09 (patch)
tree9bf3f7042c7fa1360fc446a72c37a7cebd49b8ad /source3
parentd0e9a0c4f2decbf2cd0753bdc25ac1463e8fb22b (diff)
downloadsamba-2d96983c7c95e6678ce0851af697535b7a100b09.tar.gz
samba-2d96983c7c95e6678ce0851af697535b7a100b09.tar.bz2
samba-2d96983c7c95e6678ce0851af697535b7a100b09.zip
don't close high fd's in smbrun when using insure (prevents closing
error fd) (This used to be commit defbedd198f02f7bb9af70436f5a25ab754b5fb6)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/smbrun.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/lib/smbrun.c b/source3/lib/smbrun.c
index 5a016cd5cd..8d666980b3 100644
--- 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 */