Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: SELinux is preventing pkla-check-auth from 'read' accesses on the file /etc/authselect/nsswitch.conf. ***** Plugin restorecon (99.5 confidence) suggests ************************ If you want to fix the label. /etc/authselect/nsswitch.conf default label should be etc_t. Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly. Do # /sbin/restorecon -v /etc/authselect/nsswitch.conf ***** Plugin catchall (1.49 confidence) suggests ************************** If you believe that pkla-check-auth should be allowed read access on the nsswitch.conf file 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 'pkla-check-auth' --raw | audit2allow -M my-pklacheckauth # semodule -X 300 -i my-pklacheckauth.pp Additional Information: Source Context system_u:system_r:policykit_auth_t:s0 Target Context system_u:object_r:unlabeled_t:s0 Target Objects /etc/authselect/nsswitch.conf [ file ] Source pkla-check-auth Source Path pkla-check-auth Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages Policy RPM selinux-policy-3.14.1-29.fc28.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 4.16.12-300.fc28.x86_64 #1 SMP Fri May 25 21:13:28 UTC 2018 x86_64 x86_64 Alert Count 3 First Seen 2018-05-30 20:10:33 CDT Last Seen 2018-05-30 20:10:33 CDT Local ID 3494dfbe-b4d5-4ceb-b9bf-871e1e6b257d Raw Audit Messages type=AVC msg=audit(1527729033.777:1591): avc: denied { read } for pid=7314 comm="pkla-check-auth" name="nsswitch.conf" dev="loop1" ino=818 scontext=system_u:system_r:policykit_auth_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=file permissive=0 Hash: pkla-check-auth,policykit_auth_t,unlabeled_t,file,read Version-Release number of selected component: selinux-policy-3.14.1-29.fc28.noarch Additional info: component: selinux-policy reporter: libreport-2.9.5 hashmarkername: setroubleshoot kernel: 4.16.12-300.fc28.x86_64 type: libreport
HI, Could you run: # restorecon -Rv / To restore SELinux labels on your system? THanks.
(In reply to Lukas Vrabec from comment #1) > HI, > > Could you run: > > # restorecon -Rv / > > To restore SELinux labels on your system? > > THanks. No, /etc/authselect/nsswitch.conf is mounted read-only by snapd: `/var/lib/snapd/snaps/core_4650.snap on /etc/authselect/nsswitch.conf type squashfs (ro,nodev,relatime,seclabel)`
(In reply to Lukas Vrabec from comment #1) > HI, > > Could you run: > > # restorecon -Rv / > > To restore SELinux labels on your system? > > THanks. Dear Lukas, Could you help retitle this, redirect the bug to snapd package and reopen? I understand this is not caused by selinux but by snapd installing a file not compliant with selinux. (for me it's also snapd the cause of this[1]) The effect is frustrating as I'm getting these selinux alerts all the time: https://i.imgur.com/vt2Mv9L.png Thank you. [1] [asus@localhost ~]$ grep /etc/authselect/nsswitch.conf /proc/mounts /dev/loop1 /etc/authselect/nsswitch.conf squashfs ro,seclabel,nodev,relatime 0 0 [asus@localhost ~]$ losetup /dev/loop1 /dev/loop1: []: (/var/lib/snapd/snaps/core_4917.snap) [asus@localhost ~]$ sudo blockdev --getro /dev/loop1 1
nevermind, filed https://bugzilla.redhat.com/show_bug.cgi?id=1612430