pam_usb icon indicating copy to clipboard operation
pam_usb copied to clipboard

[SELinux] SELinux set to anything except "permissive" causes issues with UDisks usage

Open mcdope opened this issue 3 years ago • 4 comments

Understood

No, I'm just too lazy to provide the data you request for a bug

Text

This was already triaged in #199. It seems SELinux prevents accessing UDisks (or dbus? tbd) from the pam module at least on tty.

Maybe this was also the cause for #141, but this is waiting for reporter feedback.

Todos: [ ] Find a working SELinux config (except setting it to permissive :stuck_out_tongue: ) [ ] Document that config for source installs [ ] Ship that config with the packages if possible

mcdope avatar Mar 21 '23 16:03 mcdope

Doc on how to diagnose such stuff: https://www.redhat.com/sysadmin/diagnose-selinux-violations

... and even better, it mentions a tool to turn a fail log into an allowance config.

mcdope avatar Mar 21 '23 18:03 mcdope

Maybe fixed by #229, will test in the coming days...

mcdope avatar Jul 03 '24 17:07 mcdope

Seems to actually be fixed by that, lol. So SELinux just didn't liked my crappy C.

pamusb-check reports "fine", sudo works, login doesn't work though. still investigating. At least it doesn't crash anymore

grafik grafik

mcdope avatar Jul 08 '24 17:07 mcdope

nvm, still broken on tty :D grafik

mcdope avatar Jul 08 '24 17:07 mcdope

Interestingly, the behaviour is different on F40

grafik

mcdope avatar Jul 21 '24 15:07 mcdope

Got it working on tty login 🥳

grafik

... now let's fix graphical logins...

mcdope avatar Jul 21 '24 15:07 mcdope

Actually - this fixed GDM as well :O Nice surprise.

grafik

mcdope avatar Jul 21 '24 15:07 mcdope

Still getting the dbus errors from https://github.com/mcdope/pam_usb/issues/201#issuecomment-2214750336 on F37 though. Unrelated I guess?

mcdope avatar Jul 21 '24 16:07 mcdope

Considering it's now working on the latest Fedora with the new profile, and lack of feedback and/or interest, and lack of distributions actually shipping SELinux... This is done.

Will merge the Fedora profile I've created, but it won't be installed by default or shipped in packages. Instead I will add a wiki entry pointing to the files and how to install them, also having a tutorial on how to create your own profile.

mcdope avatar Jul 26 '24 17:07 mcdope