View | Details | Raw Unified | Return to bug 3
Collapse All | Expand All

(-)openssh-SNAP-20011018/sshd.c.closefds (+8 lines)
Lines 804-809 Link Here
804
			close(fd);
804
			close(fd);
805
		}
805
		}
806
#endif /* TIOCNOTTY */
806
#endif /* TIOCNOTTY */
807
		{
808
		  struct rlimit rl;
809
		  if (getrlimit(RLIMIT_NOFILE, &rl) == 0) {
810
		    int i;
811
		    for(i = 3; i < rl.rlim_max; i++)
812
		      close(i);
813
		  }
814
		}
807
	}
815
	}
808
	/* Reinitialize the log (because of the fork above). */
816
	/* Reinitialize the log (because of the fork above). */
809
	log_init(__progname, options.log_level, options.log_facility, log_stderr);
817
	log_init(__progname, options.log_level, options.log_facility, log_stderr);

Return to bug 3