Bug 1615453

Summary: SELinux prevents named from writing into /var/named directory
Product: Red Hat Enterprise Linux 7 Reporter: Patrik Kis <pkis>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED DUPLICATE QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.6CC: lvrabec, mgrepl, mmalik, plautrba, ssekidde, vmojzis
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-20 18:27:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Patrik Kis 2018-08-13 16:00:38 UTC
Description of problem:
named is not allowed to write to named_zone_t

time->Sat Aug  4 18:32:53 2018
type=PROCTITLE msg=audit(1533421973.705:122): proctitle=2F7573722F7362696E2F6E616D6564002D75006E616D6564002D63002F6574632F6E616D65642E636F6E66
type=PATH msg=audit(1533421973.705:122): item=1 name="tmp-9DC7mi4TNK" objtype=CREATE cap_fp=0000000000000000 cap_fi=0000000000000000 cap_fe=0 cap_fver=0
type=PATH msg=audit(1533421973.705:122): item=0 name="/var/named" inode=34112791 dev=fd:00 mode=041770 ouid=0 ogid=25 rdev=00:00 obj=system_u:object_r:named_zone_t:s0 objtype=PARENT cap_fp=0000000000000000 cap_fi=0000000000000000 cap_fe=0 cap_fver=0
type=CWD msg=audit(1533421973.705:122):  cwd="/var/named"
type=SYSCALL msg=audit(1533421973.705:122): arch=80000016 syscall=5 success=no exit=-13 a0=3fffca7bd80 a1=c2 a2=180 a3=3fffca7ca18 items=2 ppid=1 pid=18900 auid=4294967295 uid=25 gid=25 euid=25 suid=25 fsuid=25 egid=25 sgid=25 fsgid=25 tty=(none) ses=4294967295 comm="named" exe="/usr/sbin/named" subj=system_u:system_r:named_t:s0 key=(null)
type=AVC msg=audit(1533421973.705:122): avc:  denied  { write } for  pid=18900 comm="named" name="named" dev="dm-0" ino=34112791 scontext=system_u:system_r:named_t:s0 tcontext=system_u:object_r:named_zone_t:s0 tclass=dir permissive=0

Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-210.el7.

Comment 3 Milos Malik 2018-08-13 19:59:28 UTC
I believe this bug is a duplicate of BZ#

Comment 4 Milos Malik 2018-08-13 20:00:45 UTC
I believe this bug is a duplicate of BZ#1572647.

Comment 5 Lukas Vrabec 2018-08-20 18:27:25 UTC

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