Bugzilla – Attachment 1 Details for
Bug 3
sshd does not properly daemonize itself
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to make sshd close all open fds when forking
openssh-SNAP-20011018-closefds.patch (text/plain), 489 bytes, created by
James Ralston
on 2001-10-19 06:34:23 AEST
(
hide
)
Description:
patch to make sshd close all open fds when forking
Filename:
MIME Type:
Creator:
James Ralston
Created:
2001-10-19 06:34:23 AEST
Size:
489 bytes
patch
obsolete
>--- openssh-SNAP-20011018/sshd.c.closefds Wed Oct 3 13:46:40 2001 >+++ openssh-SNAP-20011018/sshd.c Thu Oct 18 16:14:41 2001 >@@ -804,6 +804,14 @@ > close(fd); > } > #endif /* TIOCNOTTY */ >+ { >+ struct rlimit rl; >+ if (getrlimit(RLIMIT_NOFILE, &rl) == 0) { >+ int i; >+ for(i = 3; i < rl.rlim_max; i++) >+ close(i); >+ } >+ } > } > /* Reinitialize the log (because of the fork above). */ > log_init(__progname, options.log_level, options.log_facility, log_stderr);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 3
: 1