mirror of
https://github.com/samba-team/samba.git
synced 2025-03-12 20:58:37 +03:00
Patch from Mandrakesoft to ensure we close all files.
(This used to be commit 8051406588987005f621cb095067d3628638d250)
This commit is contained in:
parent
a8410f20c1
commit
548ca26bd5
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user