Red Hat Bugzilla – Bug 490010
[RHEL5] nscd in paranoia mode restarts with process name 'exe'
Last modified: 2016-11-24 10:40:37 EST
Description of problem:
If running nscd in paranoia mode, it restarts with a process name of 'exe' -- as seen by /proc/PID/status -- which causes commands like 'ps -Lf -C nscd' to fail. pgrep still works, however, since it checks /proc/PID/cmdline
This happens because it restarts itself by calling
execv ("/proc/self/exe", argv);
Instead, it should readlink() on /proc/self/exe, and then execv() on the real executable. See attached patch.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. edit /etc/nscd.conf and enable paranoia mode and set restart-interval to something short like 30 seconds
2. start nscd
3. ps -Lf -C nscd
4. ps -Lf -C exe
At first, 'ps -Lf -C nscd' reports all the nscd processes. After the first restart-interval, though, it fails to report them, and instead 'ps -Lf -C exe' starts working.
'ps -Lf -C nscd' works all the time
SELinux policies also need updating to allow nscd to restart /usr/sbin/nscd (instead of /proc/self/exe)
Switch SELinux to permissive mode
to test the patch
Created attachment 335008 [details]
patch to correct nscd's process name
See bug 490024 for the SELinux policy problem
I've applied the patch upstream.
~~ Attention - RHEL 5.4 Beta Released! ~~
RHEL 5.4 Beta has been released! There should be a fix present in the Beta release that addresses this particular request. Please test and report back results here, at your earliest convenience. RHEL 5.4 General Availability release is just around the corner!
If you encounter any issues while testing Beta, please describe the issues you have encountered and set the bug into NEED_INFO. If you encounter new issues, please clone this bug to open a new issue and request it be reviewed for inclusion in RHEL 5.4 or a later update, if it is not of urgent severity.
Please do not flip the bug status to VERIFIED. Only post your verification results, and if available, update Verified field with the appropriate value.
Questions can be posted to this bug or your customer or partner representative.
*** Bug 509949 has been marked as a duplicate of this bug. ***
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.
*** Bug 508701 has been marked as a duplicate of this bug. ***