Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
sssd-common specifies /etc/sssd/sssd.conf as:
%ghost %attr(0600,sssd,sssd) %config(noreplace) %{_sysconfdir}/sssd/sssd.conf
Upstream, this is changed to:
%ghost %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sssd/sssd.conf
Which is what sssd expects, or it will not start. This should also be changed downstream.
Version-Release number of selected component (if applicable):
sssd-common-1.16.0-19.el7_5.5.x86_64
How reproducible:
100%
Steps to Reproduce:
1. Install sssd
2. Create /etc/sssd/sssd.conf
3. chmod 0600. chown root:root
4. rpm -V sssd-common
Actual results:
.....UG.. c /etc/sssd/sssd.conf
Expected results:
No output
Additional info:
Since sssd will not start without being owned by root:root, this is critical for secure environments which check "rpm -V"
SSSD in RHEL is configured with "--with-sssd-user=sssd" and as such it soon drops root privileges and is run under sssd user. The configuration ownership is correctly set to sssd:sssd.
Can you please provide log files if SSSD is unwilling to start?
(In reply to Pavel Březina from comment #1)
> SSSD in RHEL is configured with "--with-sssd-user=sssd" and as such it soon
> drops root privileges and is run under sssd user.
Yes and no. SSSD is configured --with-sssd-user=sssd mostly to allow pipe and file ownership by the sssd user, but the default identity to run as is still root, because not everything works when running as the sssd user.
> The configuration
> ownership is correctly set to sssd:sssd.
>
> Can you please provide log files if SSSD is unwilling to start?
I think Ryan is saying something else, the important thing here is that rpm -V is complaining, which is not permitted in environments that have to comply with certain standards. I think we even have a duplicate of this bug in https://bugzilla.redhat.com/show_bug.cgi?id=1576524 but unfortunately haven't had the time to think about a fix yet.
Ryan, do you agree that this bug can be considered a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1576524 ?
I definitely agree that this can be a duplicate.
Other than security, this also affects RHV-H updates. Since uids/gids for system accounts are not deterministic, we correct ownership after updating (RHV-H is updated in an A/B fashion as a single system image).
To do this, we essentially check "rpm -V | grep -e 'U|G'", then "rpm --setugids" if this differs.
Since the specfile/rpmdb indicate that this should be sssd:sssd, but it should actually be root:root, we change the ownership to sssd:sssd, and sssd fails to start after a reboot.
There's a live customer case in the dependent bug. The workaround is easy, but it's still surprising, given that this is correct upstream.
~~~
Jun 12 10:13:06 RHVH sssd: Cannot read config file /etc/sssd/sssd.conf. Please check that the file is accessible only by the owner and owned by root.root.
Jun 12 10:13:06 RHVH systemd: sssd.service: main process exited, code=exited, status=4/NOPERMISSION
Jun 12 10:13:06 RHVH systemd: Unit sssd.service entered failed state.
Jun 12 10:13:06 RHVH systemd: sssd.service failed.
~~~
Ok, I checked the code and indeed we require root:root on sssd.conf.
The specfile should say:
%ghost %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sssd/sssd.conf
It is already fixed in rhel8.
(In reply to Pavel Březina from comment #4)
> Ok, I checked the code and indeed we require root:root on sssd.conf.
>
> The specfile should say:
> %ghost %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sssd/sssd.conf
>
> It is already fixed in rhel8.
Thank you for checking. Could you build a test package for the customer?
btw there is also https://bugzilla.redhat.com/show_bug.cgi?id=1576524 which looks somewhat similar except there are comments about the memcache files, do you think the bugs are related?
Description of problem: sssd-common specifies /etc/sssd/sssd.conf as: %ghost %attr(0600,sssd,sssd) %config(noreplace) %{_sysconfdir}/sssd/sssd.conf Upstream, this is changed to: %ghost %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sssd/sssd.conf Which is what sssd expects, or it will not start. This should also be changed downstream. Version-Release number of selected component (if applicable): sssd-common-1.16.0-19.el7_5.5.x86_64 How reproducible: 100% Steps to Reproduce: 1. Install sssd 2. Create /etc/sssd/sssd.conf 3. chmod 0600. chown root:root 4. rpm -V sssd-common Actual results: .....UG.. c /etc/sssd/sssd.conf Expected results: No output Additional info: Since sssd will not start without being owned by root:root, this is critical for secure environments which check "rpm -V"