Bug 1782694 - SELinux is preventing mandb from 'search' accesses on the directory /var/lib/snapd. [NEEDINFO]
Summary: SELinux is preventing mandb from 'search' accesses on the directory /var/lib/...
Keywords:
Status: CLOSED DUPLICATE of bug 1889645
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 31
Hardware: x86_64
OS: Unspecified
medium
low
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:c9a9b4ab600c92bd44d26c68a65...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-12 07:08 UTC by frywalker
Modified: 2020-10-22 09:25 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-22 09:25:50 UTC
Type: ---
zpytela: needinfo? (fry.futurateam)


Attachments (Terms of Use)

Description frywalker 2019-12-12 07:08:17 UTC
Description of problem:
SELinux is preventing mandb from 'search' accesses on the directory /var/lib/snapd.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that mandb should be allowed search access on the snapd 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 'mandb' --raw | audit2allow -M my-mandb
# semodule -X 300 -i my-mandb.pp

Additional Information:
Source Context                system_u:system_r:mandb_t:s0
Target Context                system_u:object_r:unlabeled_t:s0
Target Objects                /var/lib/snapd [ dir ]
Source                        mandb
Source Path                   mandb
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           snapd-2.42.2-1.fc31.x86_64
Policy RPM                    selinux-policy-3.14.4-43.fc31.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.3.14-300.fc31.x86_64 #1 SMP Mon
                              Dec 2 15:41:35 UTC 2019 x86_64 x86_64
Alert Count                   4
First Seen                    2019-12-11 19:08:58 CET
Last Seen                     2019-12-11 19:08:58 CET
Local ID                      ff206c05-ce45-415c-9012-4ec213798194

Raw Audit Messages
type=AVC msg=audit(1576087738.452:22239): avc:  denied  { search } for  pid=167097 comm="mandb" name="snapd" dev="dm-1" ino=1714889 scontext=system_u:system_r:mandb_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=dir permissive=0 trawcon="system_u:object_r:snappy_var_lib_t:s0"


Hash: mandb,mandb_t,unlabeled_t,dir,search

Version-Release number of selected component:
selinux-policy-3.14.4-43.fc31.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.11.3
hashmarkername: setroubleshoot
kernel:         5.3.15-300.fc31.x86_64
type:           libreport

Comment 1 Zdenek Pytela 2019-12-18 16:20:56 UTC
Hi,

You don't seem to have the snappy selinux module installed or active. It can be a package missing, or a clash with some previously installed custom container-selinux module.

Please:
1. ensure the subpackage is installed:
rpm -q snapd-selinux
2. check the active modules:
semodule -lfull|grep -e snappy -e container
3. list all modules with prio 200:
ls -l /var/lib/selinux/targeted/active/modules/200/

Comment 2 Zdenek Pytela 2020-10-22 09:25:50 UTC

*** This bug has been marked as a duplicate of bug 1889645 ***


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