From Bugzilla Helper: User-Agent: Mozilla/5.0 (compatible; Konqueror/3.0.0-10; Linux) Description of problem: I'm using openldap-2.0.23-4 When slapd is startd by /etc/init.d/ldap start, no pid file is created, so querying /etc/init.d/ldap status report: [root@iris /usr/lib]# /etc/init.d/ldap status slapd dead but pid file exists slurpd is stopped NB: i've pidfile /var/run/slapd.pid in my /etc/openldap/slapd.conf Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1./etc/init.d/ldap start 2.ls -la /var/run/slapd.pid 3. Actual Results: no pid file is created Additional info: slapd tries to create /var/run/slapd.pid after changing user to ldap so, as ldap user, he is unable to create anything. In original package, pidfile was placed under /var/lib/ldap, and this dir is chowned to ldap user. If u change slapd.conf with pidfile /var/lib/ldap/slapd.pid, then functions script is unable to find it.
Here's a quick hack which works around the problem. The real problem is in slapd. I'd argue that it shouldn't write its pid into an "ldap" owned file. That would allow mischief if slapd were compromised. --- ldap.init.redhat Tue Jul 3 16:09:55 2001 +++ ldap.init Thu Aug 29 13:03:14 2002 @@ -34,6 +34,8 @@ function start() { # Start daemons. + touch /var/run/slapd.pid + chown ldap /var/run/slapd.pid prog=`basename ${slapd}` echo -n $"Starting $prog: " if grep -q ^TLS /etc/openldap/slapd.conf ; then @@ -53,7 +55,17 @@ echo fi fi - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ldap + if [ $RETVAL -eq 0 ] + then + touch /var/lock/subsys/ldap + # Giv slapd time to write its pid file, then chown pidfile to root + [ -s /var/run/slapd.pid ] || sleep 1 + [ -s /var/run/slapd.pid ] || sleep 2 + [ -s /var/run/slapd.pid ] || sleep 4 + chown root /var/run/slapd.pid + else + rm /var/run/slapd.pid + fi return $RETVAL }
great :-P
Red Hat apologizes that these issues have not been resolved yet. We do want to make sure that no important bugs slip through the cracks. Red Hat Linux 7.3 and Red Hat Linux 9 are no longer supported by Red Hat, Inc. They are maintained by the Fedora Legacy project (http://www.fedoralegacy.org/) for security updates only. If this is a security issue, please reassign to the 'Fedora Legacy' product in bugzilla. Please note that Legacy security update support for these products will stop on December 31st, 2006. If this is not a security issue, please check if this issue is still present in a current Fedora Core release. If so, please change the product and version to match, and check the box indicating that the requested information has been provided. If you are currently still running Red Hat Linux 7.3 or 9, please note that Fedora Legacy security update support for these products will stop on December 31st, 2006. You are strongly advised to upgrade to a current Fedora Core release or Red Hat Enterprise Linux or comparable. Some information on which option may be right for you is available at http://www.redhat.com/rhel/migrate/redhatlinux/. Any bug still open against Red Hat Linux 7.3 or 9 at the end of 2006 will be closed 'CANTFIX'. Again, if this bug still exists in a current release, or is a security issue, please change the product as necessary. We thank you for your help, and apologize again that we haven't handled these issues to this point.
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still running Red Hat Linux, you are strongly advised to upgrade to a current Fedora Core release or Red Hat Enterprise Linux or comparable. Some information on which option may be right for you is available at http://www.redhat.com/rhel/migrate/redhatlinux/. Closing as CANTFIX.