Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 230210 - starting nscd in a temporary directory prevents paranoia mode from working
Summary: starting nscd in a temporary directory prevents paranoia mode from working
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc
Version: 4.4
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2007-02-27 14:49 UTC by Sean Dilda
Modified: 2016-11-24 12:45 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-02-28 08:21:12 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Sean Dilda 2007-02-27 14:49:30 UTC
On some of my hosts, I've enabled paranoia mode in nscd with a restart time of 5

In addition to this, we have a nightly cronjob that restarts nscd.  When this
cronjob runs, it creates a temporary directory and cd's into it and does
everything from there.   Shortly after running this script, we get this in the logs:

Feb 27 03:17:49 webhost-03 nscd: nscd startup succeeded
Feb 27 03:23:02 webhost-03 nscd: 13651 cannot change to old working directory:
No such file or directory; disabling paranoia mode

Exactly 5 minutes after startup (when paranoia mode would kick in), it tries to
cd to the temporary directory and fails (since it no longer exists), thus
disabled paranoia mode.    When I change our script to cd to / before starting
nscd, this problem goes away.

For a fix, nscd should cd to / and forget all about whatever directory it was
started from.   A simpler fix may be to force the 'cd /' in the init script.

Comment 1 Jakub Jelinek 2007-02-28 08:21:12 UTC
I think you should do it in your script rather than in nscd or in the init
script.  Many people intentionally start the daemon from a particular directory
so that it can e.g. drop core files in that directory if something bad happens.

Note You need to log in before you can comment on or make changes to this bug.