Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
xinetd
xinetd-2.3.14-restore-nofile-limits.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xinetd-2.3.14-restore-nofile-limits.patch of Package xinetd
Index: xinetd-2.3.14/xinetd/child.c =================================================================== --- xinetd-2.3.14.orig/xinetd/child.c +++ xinetd-2.3.14/xinetd/child.c @@ -205,6 +205,24 @@ static void set_credentials( const struc const char *func = "set_credentials" ; if ( SC_SPECIFIED( scp, A_GROUP ) || SC_SPECIFIED( scp, A_USER ) ) { +#ifdef RLIMIT_NOFILE + /* + * init.c/set_fd_limit changes hard limit for nofile to FD_SETSIZE to + * prevent fd_set overflow. This must be restored before setgid/setuid, + * because non-root process will be limited to FD_SETSIZE and not + * properly inherited + * + * value of rlim_cur is not important as subsequent code in exec_server + * will use proper values + * + * https://bugzilla.novell.com/show_bug.cgi?id=855685 + */ + struct rlimit rl ; + rl.rlim_max = ps.ros.orig_max_descriptors ; + rl.rlim_cur = ps.ros.max_descriptors ; + (void) setrlimit( RLIMIT_NOFILE, &rl ) ; +#endif + if ( ps.ros.is_superuser ) { gid_t gid = SC_GETGID( scp ) ;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor