Bug 1003178

Summary: SELinux is preventing /usr/lib/systemd/systemd-hostnamed from using the 'dac_override' capabilities.
Product: [Fedora] Fedora Reporter: qualityservicesrus
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, lvrabec, mgrepl, qualityservicesrus
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:f79b490581f756e062dbcbdd4c9f3b55e34e49d1f81ebf4eca2cb8700fc60dbb
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-25 10:20:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description qualityservicesrus 2013-08-31 14:11:31 UTC
Description of problem:
SELinux is preventing /usr/lib/systemd/systemd-hostnamed from using the 'dac_override' capabilities.

*****  Plugin dac_override (91.4 confidence) suggests  ***********************

If you want to help identify if domain needs this access or you have a file with the wrong permissions on your system
Then turn on full auditing to get path information about the offending file and generate the error again.
Do

Turn on full auditing
# auditctl -w /etc/shadow -p w
Try to recreate AVC. Then execute
# ausearch -m avc -ts recent
If you see PATH record check ownership/permissions on file, and fix it, 
otherwise report as a bugzilla.

*****  Plugin catchall (9.59 confidence) suggests  ***************************

If you believe that systemd-hostnamed should have the dac_override capability 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 systemd-hostnam /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:systemd_hostnamed_t:s0
Target Context                system_u:system_r:systemd_hostnamed_t:s0
Target Objects                 [ capability ]
Source                        systemd-hostnam
Source Path                   /usr/lib/systemd/systemd-hostnamed
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-204-9.fc19.i686
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-73.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.9-200.fc19.i686 #1 SMP Wed
                              Aug 21 20:48:34 UTC 2013 i686 i686
Alert Count                   2
First Seen                    2013-08-29 17:22:13 EDT
Last Seen                     2013-08-29 22:29:22 EDT
Local ID                      f1786112-695c-46f9-b3cf-39109ff2d69b

Raw Audit Messages
type=AVC msg=audit(1377829762.105:475): avc:  denied  { dac_override } for  pid=22160 comm="systemd-hostnam" capability=1  scontext=system_u:system_r:systemd_hostnamed_t:s0 tcontext=system_u:system_r:systemd_hostnamed_t:s0 tclass=capability


type=SYSCALL msg=audit(1377829762.105:475): arch=i386 syscall=open success=yes exit=EIO a0=bff38a1b a1=88000 a2=0 a3=bff38a1b items=0 ppid=1 pid=22160 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=systemd-hostnam exe=/usr/lib/systemd/systemd-hostnamed subj=system_u:system_r:systemd_hostnamed_t:s0 key=(null)

Hash: systemd-hostnam,systemd_hostnamed_t,systemd_hostnamed_t,capability,dac_override

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.10.9-200.fc19.i686
type:           libreport

Comment 1 Miroslav Grepl 2013-09-03 10:05:21 UTC
Could you turn on full auditing

# auditctl -w /etc/shadow -p w

Try to recreate AVC. Then execute

# ausearch -m avc -ts recent

Comment 2 Red Hat Bugzilla 2023-09-14 01:50:00 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days