Description of problem: nslcd is unable to create its PID file in /var/run/nslcd and fails to start. The default /etc/nslcd.conf contains: # The user and group nslcd should run as. uid nslcd gid ldap However, the PID file is apparently written before setuid() etc. call (i.e., still with root privileges) and this conflicts with access rights to /var/run/nslcd (which is created by /usr/lib/tmpfiles.d/nss-pam-ldapd.conf): # ls -dl /var/run/nslcd/ drwxr-xr-x. 2 nslcd root 80 May 28 13:10 /var/run/nslcd// ^^^^^ # cat /usr/lib/tmpfiles.d/nss-pam-ldapd.conf # nslcd needs a directory in /var/run to store its pid file and socket d /var/run/nslcd 0755 nslcd root This problem only manifests itself with SELINUX in enforcing mode, since only then root cannot ignore directory rights. Version-Release number of selected component (if applicable): 0.8.14-10.fc27 (current Fedora 28) How reproducible: Try to use it with SELINUX enabled and enforcing the policy. Steps to Reproduce: 1. dnf install nss-pam-ldapd 2. Adjust /etc/nslcd.conf according to local requirements 3. systemctl start nslcd 4. systemctl status nslcd Actual results: systemd[1]: nslcd.service: Can't open PID file /var/run/nslcd/nslcd.pid (yet?) after start: No such file or directory Expected results: The nslcd should be running.
It failed in enforcing mode because nslcd_t does not have capability dac_override sh# sesearch -A -s nslcd_t -c capability allow nslcd_t nslcd_t:capability { chown dac_read_search setgid setuid sys_nice }; But +1 for fixing permissions rather then adding unnecessary capability
Could you test following scratch build? https://koji.fedoraproject.org/koji/taskinfo?taskID=27274886
Just installed it: nss-pam-ldapd-0.8.14-12.fc28.x86_64.rpm and it works correctly. Thanks a lot.
Thank you for fixing the bug, Lukas. I built the package with your fix but for some reason I'm not able to create an update, I'm getting: You may not specify an empty list of builds. ACL validation mechanism was unable to determine ACLs. Through both the bodhi cli and the web UI..
Commit https://src.fedoraproject.org/rpms/nss-pam-ldapd/c/1ec06c959209d63b4758c85180cb9fe4e74e49b8?branch=master is not sufficient I used a different one in scratch build. I just forgot to create a PR in dist-git https://src.fedoraproject.org/fork/lslebodn/rpms/nss-pam-ldapd/branch/master_1583211 (and also branch f28_1583211)
Would you mind to create bodhi update for this build? https://koji.fedoraproject.org/koji/buildinfo?buildID=1087520
(In reply to Lukas Slebodnik from comment #6) > Would you mind to create bodhi update for this build? > https://koji.fedoraproject.org/koji/buildinfo?buildID=1087520 Done: https://bodhi.fedoraproject.org/updates/nss-pam-ldapd-0.8.14-13.fc28
This message is a reminder that Fedora 28 is nearing its end of life. On 2019-May-28 Fedora will stop maintaining and issuing updates for Fedora 28. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '28'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 28 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.