From 2d96983c7c95e6678ce0851af697535b7a100b09 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) (This used to be commit defbedd198f02f7bb9af70436f5a25ab754b5fb6) --- source3/lib/smbrun.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3') 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 */ -- cgit