diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-04-23 08:45:21 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-04-23 08:45:21 +0000 |
commit | defbedd198f02f7bb9af70436f5a25ab754b5fb6 (patch) | |
tree | b1a35c3bf0e0a35c005239b0dd61f1afcef56377 | |
parent | 91ed7d8ffe8208d06191c64f5332954ec6bf75da (diff) | |
download | samba-defbedd198f02f7bb9af70436f5a25ab754b5fb6.tar.gz samba-defbedd198f02f7bb9af70436f5a25ab754b5fb6.tar.xz samba-defbedd198f02f7bb9af70436f5a25ab754b5fb6.zip |
don't close high fd's in smbrun when using insure (prevents closing
error fd)
-rw-r--r-- | source/lib/smbrun.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/lib/smbrun.c b/source/lib/smbrun.c index 5a016cd5cd8..8d666980b38 100644 --- a/source/lib/smbrun.c +++ b/source/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 */ |