summaryrefslogtreecommitdiff
path: root/source3
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
commit548ca26bd56467f7dafaf277e4d42adeb54fb557 (patch)
tree93da51af693e42e6ef6ec44016cf233fe7b876ab /source3
parenta8410f20c1dfe0da984e162c013f48ebb60f3a9d (diff)
downloadsamba-548ca26bd56467f7dafaf277e4d42adeb54fb557.tar.gz
samba-548ca26bd56467f7dafaf277e4d42adeb54fb557.tar.bz2
samba-548ca26bd56467f7dafaf277e4d42adeb54fb557.zip
Patch from Mandrakesoft to ensure we close all files.
(This used to be commit 8051406588987005f621cb095067d3628638d250)
Diffstat (limited to 'source3')
-rw-r--r--source3/client/smbmount.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/client/smbmount.c b/source3/client/smbmount.c
index 35677815ff..7da96ba8c3 100644
--- a/source3/client/smbmount.c
+++ b/source3/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);
}