summaryrefslogtreecommitdiffstats
path: root/source/client/smbmount.c
diff options
context:
space:
mode:
authorJohn Terpstra <jht@samba.org>2001-04-14 18:39:32 +0000
committerJohn Terpstra <jht@samba.org>2001-04-14 18:39:32 +0000
commit8051406588987005f621cb095067d3628638d250 (patch)
tree713e90fcdc840cc8f9f9792274ea1820ab685015 /source/client/smbmount.c
parentd6889b1954bd863fd04cf43fb25f178b1d1ab67f (diff)
downloadsamba-8051406588987005f621cb095067d3628638d250.tar.gz
samba-8051406588987005f621cb095067d3628638d250.tar.xz
samba-8051406588987005f621cb095067d3628638d250.zip
Patch from Mandrakesoft to ensure we close all files.
Diffstat (limited to 'source/client/smbmount.c')
-rw-r--r--source/client/smbmount.c4
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);
}