The selinux policy module for xinetd lacks the necessary permissions for the xinetd daemon to get and set appropriate resource limits during it's normal operation. The attached patch to the policy module addresses this. Reproducible: Always Steps to Reproduce: 1.enable selinux strict policy 2.load the inetd policy module 3.when xinetd receives a connection and launches a child process daemon it is unable to check system resources and set appropriate limits Actual Results: The following audit log entries: Nov 8 08:23:19 xxxx kernel: type=1400 audit(1320765799.720:5654): avc: denied { sys_resource } for pid=12851 comm="xinetd" capability=24 scontext=system_u:system_r:inetd_t tcontext=system_u:system_r:inetd_t tclass=capability Nov 8 08:23:19 xxxx kernel: type=1400 audit(1320765799.720:5655): avc: denied { setrlimit } for pid=12851 comm="xinetd" scontext=system_u:system_r:inetd_t tcontext=system_u:system_r:inetd_t tclass=process Expected Results: xinetd should have sys_resource and setrlimit capabilities
Created attachment 291979 [details, diff] Patch to allow required capability The attached patch supplies the needed capability
Confirmed on setrlimit: if xinetd is build with PAM support, it needs to support pam_limits which is used to set resource limits. Still trying to figure out if sys_resource capability is the same.
Yup, seems like CAP_SYS_RESOURCE is needed when you want to call setrlimit.
In hardened-dev overlay
Moved to main portage tree, ~arch'ed.
Stabilized