diff options
author | John Terpstra <jht@samba.org> | 2001-04-14 18:39:32 +0000 |
---|---|---|
committer | John Terpstra <jht@samba.org> | 2001-04-14 18:39:32 +0000 |
commit | 8051406588987005f621cb095067d3628638d250 (patch) | |
tree | 713e90fcdc840cc8f9f9792274ea1820ab685015 /source | |
parent | d6889b1954bd863fd04cf43fb25f178b1d1ab67f (diff) | |
download | samba-8051406588987005f621cb095067d3628638d250.tar.gz samba-8051406588987005f621cb095067d3628638d250.tar.xz samba-8051406588987005f621cb095067d3628638d250.zip |
Patch from Mandrakesoft to ensure we close all files.
Diffstat (limited to 'source')
-rw-r--r-- | source/client/smbmount.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/client/smbmount.c b/source/client/smbmount.c index 35677815fff..7da96ba8c35 100644 --- a/source/client/smbmount.c +++ b/source/client/smbmount.c @@ -95,7 +95,9 @@ static void daemonize(void) static void close_our_files(int client_fd) { int i; - for (i = 0; i < 256; i++) { + + getrlimit(RLIMIT_NOFILE,&limits); + for (1 = 0; i< limits.rlim_max, i++) { if (i == client_fd) continue; close(i); } |