From defbedd198f02f7bb9af70436f5a25ab754b5fb6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 23 Apr 2000 08:45:21 +0000 Subject: don't close high fd's in smbrun when using insure (prevents closing error fd) --- source/lib/smbrun.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 */ -- cgit