-
Bug
-
Resolution: Done-Errata
-
Major
-
rhel-9.3.0
-
None
-
libdnf-0.69.0-8.el9
-
None
-
Important
-
rhel-sst-cs-software-management
-
ssg_core_services
-
14
-
22
-
None
-
QE ack
-
False
-
-
Yes
-
None
-
-
Pass
-
Enabled
-
Automated
-
Bug Fix
-
-
Done
-
-
All
-
None
Description of problem:
This is observed on a customer system when insights-client executes.
In this specific case (but there are likely other cases), the /run/user/0 directory gets created with insights_client_tmp_t context, causing systemd's user-runtime-dir@0.service unit to fail forever:
Aug 08 13:24:22 vm-insights8 systemd[1]: Stopping User runtime directory /run/user/0... Aug 08 13:24:22 vm-insights8 systemd-user-runtime-dir[34749]: Failed to remove runtime directory /run/user/0 (after unmounting): Permission denied Aug 08 13:24:22 vm-insights8 systemd[1]: user-runtime-dir@0.service: Control process exited, code=exited status=1 Aug 08 13:24:22 vm-insights8 systemd[1]: user-runtime-dir@0.service: Failed with result 'exit-code'.
The root cause for this is the libdnf code forcibly creates the /run/user/0 directory when trying to import GPG keys in ensure_socket_dir_exists() function.
[...]
Not creating this directory is the only reliable solution to make sure whatever the caller is, this will work.
RHEL 9 is also affected:
gnupg2-2.3.3-4.el9.x86_64
libdnf-0.69.0-6.el9_3.x86_64
librepo-1.14.5-1.el9.x86_64
- clones
-
RHEL-6421 libdnf may create /run/user/0 directory, causing a bad context to be applied, leading to further issues
- Closed
- is blocked by
-
RHEL-11240 Set a default SELinux label on /run/user/$PID
- Closed
- is related to
-
RHEL-11250 libdnf used by Insights client labels temporary files with insights_client_tmp_t leading to denials by systemd and gnupg
- Closed
- links to
-
RHBA-2023:123792 libdnf bug fix and enhancement update
- mentioned on