Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
can't startx with selinux
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
gxeyes
n00b
n00b


Joined: 05 Nov 2020
Posts: 12

PostPosted: Wed Feb 02, 2022 6:18 am    Post subject: can't startx with selinux Reply with quote

I've installed a stage 3 with selinux support and emerged x server. Also relabeled the whole system after that just in case.

While the CLI side of the system seems to be in a working condition in enforce mode, trying to startx causes the system to hang with a blank screen, can't use ctrl-alt-fn to switch to another TTY.

If I use semanage permissive -a to put server_t, xauth_t, systemd_logind_t (elogind?) and system_dbusd_t into permissive mode, the x server can start and there are a bunch of AVC denies logged, such as can't { getattr } for "/" and can't { use } "/dev/dri/card0".

Does this point a broken install or missing some steps somewhere, or is this (startx manually) not a well supported use case for selinux on Gentoo?

Have two other basic questions:

1. I'm a bit more familiar with app armor, and when aa complains (logs denials in syslog) it is usually clear enough to add needed rules to the application's profile. I've been reading up on selinux concepts like labels and roles but can't even find where the profile/policy for x server would be on the system, let alone trying to modify it. Would appreciate any pointers on getting started here in case I need to "fix" the x server ones or create more custom rules.

2. What's an effective way to search for selinux answers on the internet?
If I search for the actual error message, it seems that 99% of the results are bug reports and take the form of:
user: X app doesn't work in selinux, is this a bug?
dev: try this patch?
user: it works
dev: will be fixed in the next release
without any detailed "technical info" or how was it fixed.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3948

PostPosted: Wed Feb 02, 2022 9:31 am    Post subject: Reply with quote

Plz try
Code:

ausearch -m AVC  | audit2allow -a -M my_pol1
semodule -i my_pol1.pp

You do have auditd running no?
You should lobby the Gentoo selinux developers/maintainers to make available the
setroubleshoot-server
package.
Until then you will have a bumpy ride with selinux.
_________________
:)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum