Bug 2057576

Summary: Permissions of files owned by accountsservice package diverge from RPM database
Product: Red Hat Enterprise Linux 9 Reporter: Ray Strode [halfline] <rstrode>
Component: accountsserviceAssignee: Ray Strode [halfline] <rstrode>
Status: CLOSED ERRATA QA Contact: Michal Odehnal <modehnal>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 9.0CC: ayadav, mmarhefk, modehnal, rstrode, tpelka
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: accountsservice-0.6.55-10.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1919300 Environment:
Last Closed: 2022-05-17 12:48:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1919300    
Bug Blocks:    

Description Ray Strode [halfline] 2022-02-23 16:04:06 UTC
+++ This bug was initially created as a clone of Bug #1919300 +++

Description of problem:
After installing hardened RHEL8 system (with either PCI-DSS, E8 or HIPAA profile) the rule rpm_verify_permissions reports a finding that the folder /var/lib/AccountsService/icons (from accountsservice RPM) has different permissions compared to the ones expected in the package metadata stored in the rpm database.

Version-Release number of selected component (if applicable):
accountsservice-0.6.55-1.el8

How reproducible:
100%

Steps to Reproduce:
1. Start RHEL8 installation
2. Select Server with GUI package group
3. Select PCI-DSS, E8, or HIPAA profile
4. Log into the system after installation and verify installed files by the package accountsservice against the files taken from the package metadata stored in the rpm database:
# rpm -Va accountsservice
.M.......    /var/lib/AccountsService/icons
# ls -l /var/lib/AccountsService/
total 0
drwxrwxr-x. 2 root root  6 Jan 15 19:03 icons
drwx------. 2 root root 18 Jan 22 11:34 users

5. Fix the permissions for the affected folder:
# rpm --setperms accountsservice
# rpm -Va accountsservice
# ls -l /var/lib/AccountsService/
total 0
drwxr-xr-x. 2 root root  6 Jan 15 19:03 icons
drwx------. 2 root root 18 Jan 22 11:34 users

6. Reboot the system and verify the installed files after the reboot once more (issue is back):
# rpm -Va accountsservice
.M.......    /var/lib/AccountsService/icons
# ls -l /var/lib/AccountsService/
total 0
drwxrwxr-x. 2 root root  6 Jan 15 19:03 icons
drwx------. 2 root root 18 Jan 22 11:34 users


Actual results:
Installed directory /var/lib/AccountsService/icons (from accountsservice RPM) has different permissions compared to the ones expected by the package metadata stored in the rpm database. Also after fixing the permissions they change again after rebooting the system.

Expected results:
Installed directory /var/lib/AccountsService/icons (from accountsservice RPM) has the same permissions as expected by the package metadata stored in the rpm database.

Additional info:

--- Additional comment from errata-xmlrpc on 2021-10-27 11:01:45 EDT ---

This bug has been added to advisory RHBA-2021:82792 by auto/ptp-jenkins (auto/ptp-jenkins)

--- Additional comment from errata-xmlrpc on 2021-10-27 11:01:48 EDT ---

Bug report changed to ON_QA status by Errata System.
A QE request has been submitted for advisory RHBA-2021:82792-01
https://errata.devel.redhat.com/advisory/82792

--- Additional comment from amit yadav on 2022-02-23 08:34:12 EST ---

The issue is reproducible on RHEL9 Beta as well. There is no need to reboot the system to reproduce the issue.
I am able to reproduce this issue after changing the runlevel only. 

~~~
# init 3
# init 5
~~~

Comment 6 errata-xmlrpc 2022-05-17 12:48:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: accountsservice), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:2403

Comment 7 Ray Strode [halfline] 2022-11-16 15:23:43 UTC
*** Bug 2027004 has been marked as a duplicate of this bug. ***