Bug 641176
Summary: | Selinux does not allow dnsmasq reading /var/run/ppp/resolv.conf file. | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Van de Bugger <van.de.bugger> |
Component: | selinux-policy-targeted | Assignee: | Miroslav Grepl <mgrepl> |
Status: | CLOSED ERRATA | QA Contact: | Ben Levenson <benl> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 13 | Keywords: | SELinux |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | selinux-policy-3.7.19-69.fc13 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-11-11 22:23:01 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
Van de Bugger
2010-10-07 22:59:12 UTC
Does running restorecon -R -v /var/run Change the context? No, it does not. The context is: $ ls -Z resolv.conf -rw-r--r--. root root system_u:object_r:pppd_var_run_t:s0 resolv.conf BTW, dnsmasq drops itself to user "nobody" group "dip". The AVC you reported was dnsmasq trying to read a tmp directory created by initrc_t. Do you init scripts create something within /tmp that dnsmasq then attempts to read? Sorry, probably I copied the wrong piece. Originally I set up dnsmasq to read /var/run/ppp/resolv.conf, but dnsmasq failed to read this file. Then I created /sbin/ifup-local to copy /var/run/ppp/resolv.conf to /tmp/resolv.conf and changed dnsmasq configuration to read the latter file, but it failed again. The only workaround I found is copying /var/run/ppp/resolv.conf to /etc/resolv.dnsmasq.conf, this file can be read. I will try to reproduce the problem again and attach proper AVC messages. Ok, here is the attempt to read /var/run/ppp/resolv.conf: Oct 12 23:17:28 antec dnsmasq[8490]: started, version 2.52 cachesize 1000 Oct 12 23:17:28 antec dnsmasq[8490]: compile time options: IPv6 GNU-getopt DBus no-I18N DHCP TFTP Oct 12 23:17:28 antec dnsmasq-dhcp[8490]: DHCP, IP range 192.168.56.20 -- 192.168.56.250, lease time 1d Oct 12 23:17:28 antec dnsmasq-dhcp[8490]: DHCP, IP range 192.168.1.20 -- 192.168.1.250, lease time 1d Oct 12 23:17:28 antec dnsmasq[8490]: failed to access /var/run/ppp/resolv.conf: Permission denied Oct 12 23:17:28 antec dnsmasq[8490]: read /etc/hosts - 8 addresses Oct 12 23:17:28 antec kernel: type=1400 audit(1286911048.304:12): avc: denied { search } for pid=8490 comm="dnsmasq" name="ppp" dev=sda3 ino=17285 scontext=unconfined_u:system_r:dnsmasq_t:s0 tcontext=system_u:object_r:pppd_var_run_t:s0 tclass=dir Miroslav add optional_policy(` ppp_read_pid_files(dnsmasq_t) ') But change ppp_read_pid_files to use read_files_pattern($1, pppd_var_run_t, pppd_var_run_t) Fixed in selinux-policy-3.7.19-66.fc13 selinux-policy-3.7.19-69.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/selinux-policy-3.7.19-69.fc13 selinux-policy-3.7.19-69.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update selinux-policy'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/selinux-policy-3.7.19-69.fc13 Just checked. The bug is fixed. Thanks! selinux-policy-3.7.19-69.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report. |