Bug 966552 - SELinux is preventing /usr/sbin/unbound-checkconf from 'open' accesses on the file /etc/unbound/keys.d/example.com.key.
Summary: SELinux is preventing /usr/sbin/unbound-checkconf from 'open' accesses on the...
Keywords:
Status: CLOSED DUPLICATE of bug 966542
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:26a2a01ef120bcdaef1fe4802d2...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-23 13:23 UTC by Moez Roy
Modified: 2013-05-28 08:20 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-28 08:20:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Moez Roy 2013-05-23 13:23:58 UTC
Description of problem:
SELinux is preventing /usr/sbin/unbound-checkconf from 'open' accesses on the file /etc/unbound/keys.d/example.com.key.

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

If you believe that unbound-checkconf should be allowed open access on the example.com.key 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:
# grep unbound-checkco /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:initrc_t:s0
Target Context                system_u:object_r:dnssec_t:s0
Target Objects                /etc/unbound/keys.d/example.com.key [ file ]
Source                        unbound-checkco
Source Path                   /usr/sbin/unbound-checkconf
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           unbound-1.4.19-1.fc18.x86_64
Target RPM Packages           unbound-1.4.19-1.fc18.x86_64
Policy RPM                    selinux-policy-3.11.1-96.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.2-200.fc18.x86_64 #1 SMP Mon
                              May 13 13:59:47 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-05-23 06:21:52 PDT
Last Seen                     2013-05-23 06:21:52 PDT
Local ID                      26a34415-2637-4ca4-b23e-244649cb36b8

Raw Audit Messages
type=AVC msg=audit(1369315312.460:321): avc:  denied  { open } for  pid=1272 comm="unbound-checkco" path="/etc/unbound/keys.d/example.com.key" dev="sda2" ino=1320385 scontext=system_u:system_r:initrc_t:s0 tcontext=system_u:object_r:dnssec_t:s0 tclass=file


type=SYSCALL msg=audit(1369315312.460:321): arch=x86_64 syscall=open success=no exit=EACCES a0=1334c10 a1=0 a2=1b6 a3=238 items=0 ppid=1 pid=1272 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=unbound-checkco exe=/usr/sbin/unbound-checkconf subj=system_u:system_r:initrc_t:s0 key=(null)

Hash: unbound-checkco,initrc_t,dnssec_t,file,open

audit2allow

#============= initrc_t ==============
allow initrc_t dnssec_t:file open;

audit2allow -R
require {
	type initrc_t;
}

#============= initrc_t ==============
bind_read_dnssec_keys(initrc_t)


Additional info:
hashmarkername: setroubleshoot
kernel:         3.9.2-200.fc18.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-05-23 18:23:08 UTC
Did you disable the unconfined module?

Comment 2 Daniel Walsh 2013-05-23 18:24:53 UTC
restorecon -r -v /usr/sbin/unbound-checkconf

Comment 3 Moez Roy 2013-05-25 14:58:07 UTC
(In reply to Daniel Walsh from comment #1)
> Did you disable the unconfined module?

Yes.

sudo yum install dnssec-trigger

sudo semodule -d unconfined

Reboot.

Get the AVC denials.

Comment 4 Miroslav Grepl 2013-05-28 08:20:28 UTC

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


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