Bug 1979459 - snapd breaks GNOME for SELinux confined users
Summary: snapd breaks GNOME for SELinux confined users
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: snapd
Version: epel7
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Zygmunt Krynicki
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-06 06:19 UTC by bugreports2005
Modified: 2024-07-09 03:38 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-07-09 03:38:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description bugreports2005 2021-07-06 06:19:09 UTC
Description of problem:

When snapd is installed and a user with context set to staff_t logs into GNOME classic, the background is black and there are no bars. I did not test but was told that the non-classic was even more broken.

My analysis suggests that this is because /etc/profile.d/snapd.sh adds /var/lib/snapd/desktop to XDG_DATA_DIRS, SELinux prevents all access to it, and GNOME just gives up when that happens.

Adding this SELinux rule helped with the GNOME brokenness, although I do not know if it's enough for snaherep itself to work for a confined user. Should possibly add for user_t as well.

snappy_search_lib(staff_t);


Version-Release number of selected component (if applicable):
2.51-1.el7

How reproducible:
is reproducible

Steps to Reproduce:
1. install snapd, create testuser account
2. semanage login -a testuser -s staff_u
3. log testuser into gnome classic

Actual results:
black background, no menu bars, broken and hard to use


Expected results:
gnome works normally


Additional info:

This is just a specific case of brokenness, the SELinux rules governing /var/lib/snapd should probably be relaxed more generally as there are other related bugs about SELinux preventing access: #1648701, #1888699, #1973097, #1960735.

I don't know if this is enough to get snap actually work for a confined user.

Comment 1 Troy Dawson 2024-07-09 03:38:25 UTC
EPEL 7 entered end-of-life (EOL) status on 2024-06-30.\n\nEPEL 7 is no longer maintained, which means that it\nwill not receive any further security or bug fix updates.\n As a result we are closing this bug.


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