Bug 127555

Summary: named can't write slave zone files to /var/named/chroot/var/named/slaves
Product: [Fedora] Fedora Reporter: Alexandre Oliva <oliva>
Component: selinux-policy-targetedAssignee: Jason Vas Dias <jvdias>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: bind-9.2.4rc7-9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-08-25 22:52: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 Alexandre Oliva 2004-07-09 17:30:05 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510

Description of problem:
The context associated with the slaves directory is incorrect, since
it doesn't allow bind to write zone files it downloads from master
servers in there.  It has to be named_cache_t.


Version-Release number of selected component (if applicable):
bind-9.2.3-18 selinux-policy-targeted-1.14.1-5

How reproducible:
Always

Steps to Reproduce:
1.start bind with a config file that requires slave zones to be stored
in the slaves dir, in the chroot

Actual Results:  selinux won't let it.

Expected Results:  it should.

Additional info:

Comment 1 Daniel Walsh 2004-07-20 15:23:03 UTC
Could you send me the AVC Messages?

Comment 2 Alexandre Oliva 2004-07-21 05:16:46 UTC
Not easily.  I ended up reinstalling FC3test1 with SELinux disabled on
all my boxes, because SELinux, as it stands, would take me too much
work to add file_contexts rules such that my home dir, that is a mess
of soft links, would work.

Comment 3 Daniel Walsh 2004-07-21 18:40:55 UTC
If you tried targeted policy there should not be a problem. 
Homedirectories don't matter that much.  But you could still generate
the bind error since it runs under policy.


Comment 4 Jason Vas Dias 2004-07-27 15:58:35 UTC
This is now fixed.
The /var/named/chroot/named/slaves directory was not being created -
it now is, with ownership named:named, the same as the 
/var/named/slaves directory, while /var/named and chroot/var/named
have ownership root:named.

This is now in bind-9.2.4rc6-1 in fc3-head.


Comment 5 Alexandre Oliva 2004-07-30 07:10:41 UTC
I tried the targeted policy, it didn't work because I have stuff like
squid and sendmail writing to the partition that also contains my home
dir.

As for the contexts defined in the policy, it's still not right. 
selinux-policy-*-1.15.9-1 define contexts for /var/named/slave, not
/var/named/slaves, both in root and chroot.

Comment 6 Jason Vas Dias 2004-08-25 22:52:08 UTC
This is now fixed (selinux-policy-targeted-1.17.4-1 and
bind-9.2.4rc7-9).
 

Comment 7 Alexandre Oliva 2004-09-05 06:03:31 UTC
I've finally tried again an install of rawhide from scratch with
SELinux enabled, and I can now confirm that it works.  Thanks,