Description of problem: Setting up PowerDNS with an SQLite database currently fails to start do to a SELinux permission fail when PDNS tries to `map` the sqlite -shm file. Version-Release number of selected component (if applicable): 4.6.2-1.el9 How reproducible: Everytime Steps to Reproduce: 1. dnf install pdns pdns-backend-sqlite 2. edit /etc/pdns/pdns.conf to use the sqlite backend 3. setup an sqlite database on /var/lib/pdns/ 4. try to start the pdns Actual results: after setting all the correct selinux permissions, audit.log shows this: type=AVC msg=audit(1670783172.019:9025): avc: denied { map } for pid=21704 comm="pdns_server" path="/var/lib/pdns/r3pek.org.sqlite-shm" dev="dm-0" ino=50763508 scontext=system_u:system_r:pdns_t:s0 tcontext=system_u:object_r:pdns_var_lib_t:s0 tclass=file permissive=0 Expected results: pdns should start normally Additional info: [root@dns01 pdns]# pwd /var/lib/pdns [root@dns01 pdns]# ls -lhZa total 108K drwx------. 2 pdns pdns system_u:object_r:pdns_var_lib_t:s0 86 Dec 11 18:15 . drwxr-xr-x. 25 root root system_u:object_r:var_lib_t:s0 4.0K Dec 11 18:03 .. -rw-------. 1 pdns pdns system_u:object_r:pdns_var_lib_t:s0 72K Dec 11 18:15 r3pek.org.sqlite -rw-------. 1 pdns pdns system_u:object_r:pdns_var_lib_t:s0 32K Dec 11 18:27 r3pek.org.sqlite-shm -rw-------. 1 pdns pdns system_u:object_r:pdns_var_lib_t:s0 0 Dec 11 18:15 r3pek.org.sqlite-wal
OK, after using audit2why I've found out that we can use `setsebool -P domain_can_mmap_files 1` to allow for this behaviour. Please close if NOTABUG.