Bug 2230784 - SELinux is preventing systemd-user-ru from 'write' accesses on the directory gnome-shell.
Summary: SELinux is preventing systemd-user-ru from 'write' accesses on the directory ...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 38
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:99eb4db06122d083d621b047ba1...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-10 05:32 UTC by tongnguyenminhkhang21012020
Modified: 2023-08-11 13:16 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-11 13:16:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: os_info (734 bytes, text/plain)
2023-08-10 05:32 UTC, tongnguyenminhkhang21012020
no flags Details
File: description (2.72 KB, text/plain)
2023-08-10 05:32 UTC, tongnguyenminhkhang21012020
no flags Details

Description tongnguyenminhkhang21012020 2023-08-10 05:32:42 UTC
Description of problem:
I change my GNOME Shell's theme using gdm-tweak-tools installed through dnf, for some reason libreport crashed after applyin the new theme, I logged out and logged in again to apply GDM theme
SELinux is preventing systemd-user-ru from 'write' accesses on the directory gnome-shell.

*****  Plugin catchall_labels (83.8 confidence) suggests   *******************

If you want to allow systemd-user-ru to have write access on the gnome-shell directory
Then you need to change the label on gnome-shell
Do
# semanage fcontext -a -t FILE_TYPE 'gnome-shell'
where FILE_TYPE is one of the following: abrt_var_cache_t, cgroup_t, config_home_t, container_file_t, efivarfs_t, fusefs_t, gkeyringd_tmp_t, gstreamer_home_t, init_var_lib_t, init_var_run_t, krb5_host_rcache_t, mozilla_plugin_tmp_t, mozilla_plugin_tmpfs_t, session_dbusd_tmp_t, systemd_logind_inhibit_var_run_t, systemd_logind_sessions_t, systemd_logind_var_lib_t, systemd_logind_var_run_t, systemd_passwd_var_run_t, tmp_t, tmpfs_t, udev_rules_t, user_tmp_t, var_auth_t, var_run_t.
Then execute:
restorecon -v 'gnome-shell'


*****  Plugin catchall (17.1 confidence) suggests   **************************

If you believe that systemd-user-ru should be allowed write access on the gnome-shell directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'systemd-user-ru' --raw | audit2allow -M my-systemduserru
# semodule -X 300 -i my-systemduserru.pp

Additional Information:
Source Context                system_u:system_r:systemd_logind_t:s0
Target Context                system_u:object_r:usr_t:s0
Target Objects                gnome-shell [ dir ]
Source                        systemd-user-ru
Source Path                   systemd-user-ru
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-38.22-1.fc38.noarch
Local Policy RPM              selinux-policy-targeted-38.22-1.fc38.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.4.7-200.fc38.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Thu Jul 27 20:01:18 UTC 2023
                              x86_64
Alert Count                   32
First Seen                    2023-08-10 12:27:11 +07
Last Seen                     2023-08-10 12:27:11 +07
Local ID                      d0c51852-b655-47a7-9224-70edcbc9be69

Raw Audit Messages
type=AVC msg=audit(1691645231.545:599): avc:  denied  { write } for  pid=42159 comm="systemd-user-ru" name="gnome-shell" dev="tmpfs" ino=4791 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:usr_t:s0 tclass=dir permissive=0


Hash: systemd-user-ru,systemd_logind_t,usr_t,dir,write

Version-Release number of selected component:
selinux-policy-targeted-38.22-1.fc38.noarch

Additional info:
reporter:       libreport-2.17.11
hashmarkername: setroubleshoot
reason:         SELinux is preventing systemd-user-ru from 'write' accesses on the directory gnome-shell.
type:           libreport
kernel:         6.4.7-200.fc38.x86_64
package:        selinux-policy-targeted-38.22-1.fc38.noarch
comment:        I change my GNOME Shell's theme using gdm-tweak-tools installed through dnf, for some reason libreport crashed after applyin the new theme, I logged out and logged in again to apply GDM theme
component:      selinux-policy
component:      selinux-policy

Comment 1 tongnguyenminhkhang21012020 2023-08-10 05:32:45 UTC
Created attachment 1982716 [details]
File: os_info

Comment 2 tongnguyenminhkhang21012020 2023-08-10 05:32:48 UTC
Created attachment 1982717 [details]
File: description

Comment 3 Zdenek Pytela 2023-08-10 11:22:32 UTC
Hi,

Where exactly the process failed, was it the rpm package installation?
I cannot find gdm-tweak-tools package in Fedora.

Comment 4 tongnguyenminhkhang21012020 2023-08-11 10:00:58 UTC
Oops, my fault, I installed GDM Tools on Flathub, sorry for any convenience.

Comment 5 Zdenek Pytela 2023-08-11 13:16:39 UTC
Closing then, you may ask the package vendor for further assistance.


Note You need to log in before you can comment on or make changes to this bug.