URL: https://github.com/SSSD/sssd/pull/718 Author: jhrozek Title: #718: NSS: Avoid changing the memory cache ownership away from the sssd user (sssd-1-16 backport) Action: opened
PR body: """ Resolves: https://pagure.io/SSSD/sssd/issue/3890
In case SSSD is compiled --with-sssd-user but run as root (which is the default on RHEL and derivatives), then the memory cache will be owned by the user that sssd_nss runs as, so root.
This conflicts with the packaging which specifies sssd.sssd as the owner. And in turn, this means that users can't reliably assess the package integrity using rpm -V.
This patch makes sure that the memory cache files are chowned to sssd.sssd even if the nss responder runs as root.
Also, this patch changes the sssd_nss responder so that is becomes a member of the supplementary sssd group. Even though in traditional UNIX sense, a process running as root could write to a file owned by sssd:sssd, with SELinux enforcing mode this becomes problematic as SELinux emits an error such as:
type=AVC msg=audit(1543524888.125:1495): avc: denied { fsetid } for pid=7706 comm="sssd_nss" capability=4 scontext=system_u:system_r:sssd_t:s0 tcontext=system_u:system_r:sssd_t:s0 tclass=capability
To make it possible for the sssd_nss process to write to the files, the files are also made group-writable. The 'others' permission is still set to read only.
Reviewed-by: Michal Židek mzidek@redhat.com (cherry picked from commit 61e4ba58934b20a950255e05797aca25aadc1242) """
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/718/head:pr718 git checkout pr718
URL: https://github.com/SSSD/sssd/pull/718 Title: #718: NSS: Avoid changing the memory cache ownership away from the sssd user (sssd-1-16 backport)
mzidek-rh commented: """ I found no issues. Just waiting for CI to finish. """
See the full comment at https://github.com/SSSD/sssd/pull/718#issuecomment-467031603
URL: https://github.com/SSSD/sssd/pull/718 Title: #718: NSS: Avoid changing the memory cache ownership away from the sssd user (sssd-1-16 backport)
mzidek-rh commented: """ ACK. """
See the full comment at https://github.com/SSSD/sssd/pull/718#issuecomment-467052033
URL: https://github.com/SSSD/sssd/pull/718 Title: #718: NSS: Avoid changing the memory cache ownership away from the sssd user (sssd-1-16 backport)
Label: +Accepted
URL: https://github.com/SSSD/sssd/pull/718 Title: #718: NSS: Avoid changing the memory cache ownership away from the sssd user (sssd-1-16 backport)
jhrozek commented: """ * sssd-1-16: 118c44f90c9c901ffbf1b676be57b7a83a190399 """
See the full comment at https://github.com/SSSD/sssd/pull/718#issuecomment-467635000
URL: https://github.com/SSSD/sssd/pull/718 Author: jhrozek Title: #718: NSS: Avoid changing the memory cache ownership away from the sssd user (sssd-1-16 backport) Action: closed
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/718/head:pr718 git checkout pr718
URL: https://github.com/SSSD/sssd/pull/718 Title: #718: NSS: Avoid changing the memory cache ownership away from the sssd user (sssd-1-16 backport)
Label: +Pushed
sssd-devel@lists.fedorahosted.org