Bug 125696 - slapd.pid and slapd.args can't be created
slapd.pid and slapd.args can't be created
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: openldap (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jan Safranek
Jay Turner
Depends On:
  Show dependency treegraph
Reported: 2004-06-10 04:15 EDT by Alexandre Garel
Modified: 2015-01-07 19:08 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-10-19 15:24:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alexandre Garel 2004-06-10 04:15:38 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.5)

Description of problem:
the /etc/openldap/slapd.conf file define the slapd.args and slapd.pid
files to be created in /var/run/slapd.pid. When /etc/init.d/ldap start
is runned, slapd is runned with user ldap and don't have the right to
create files in /var/run.
As long as there is only one instance of slpad this does not harm but
if you install more, making a /etc/init.d/ldap stop would cause all
slapd instance to crash. This is because the functions that stop the
process does not find the pid file in /var/run and makes a kill by name.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. run an other instance of slapd (eg. slapd -f myslapd.conf -h
2. run the normal instance /etc/init.d/ldap start
3. stop it /etc/init.d/ldap stop

Actual Results:  ps -ax | grep slapd
confirm that there are no more slapd running.

Expected Results:  there shall have been on instance still runing.

Additional info:

workaround :
The solution is to
create a directory /var/run/ldap belonging to user ldap
configure slapd.conf with
pidfile    /var/run/ldap/slapd.args
argsfile    /var/run/ldap/slapd.args
modify /etc/init.d/ldap at the end of function start (just before the
return statement) with
[ $RETVAL -eq 0 ] && ln -s /var/run/ldap/slapd.{pid,args} /var/run/.
and at the end of function stop
[ $RETVAL -eq 0 ] && rm -f /var/run/slapd.{pid,args}
Comment 1 RHEL Product and Program Management 2007-10-19 15:24:22 EDT
This bug is filed against RHEL 3, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products. Since
this bug does not meet that criteria, it is now being closed.
For more information of the RHEL errata support policy, please visit:
If you feel this bug is indeed mission critical, please contact your
support representative. You may be asked to provide detailed
information on how this bug is affecting you.

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