Bug 902431
Summary: | bind-chroot creates /var/named/chroot/etc/localtime with incorrect selinux context | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Karel Srot <ksrot> | ||||||
Component: | bind | Assignee: | Tomáš Hozza <thozza> | ||||||
Status: | CLOSED ERRATA | QA Contact: | qe-baseos-daemons | ||||||
Severity: | low | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 6.5 | CC: | hhorak, mgrepl, mmalik, thozza | ||||||
Target Milestone: | rc | Keywords: | Patch | ||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | bind-9.8.2-0.27.rc1.el6 | Doc Type: | Bug Fix | ||||||
Doc Text: |
Cause:
The /var/named/chroot/etc/localtime was created during the installation of the bind-chroot package, but its SELinux context was not restored.
Consequence:
As a consequence, the /var/named/chroot/etc/localtime had wrong SELinux context.
Fix:
The command to restore the SELinux context of /var/named/chroot/etc/localtime after creation has been added into the post transaction section of the SPEC file.
Result:
As a result, the /var/named/chroot/etc/localtime has now the correct SELinux context after installation of bind-chroot package.
|
Story Points: | --- | ||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2014-10-14 04:34:31 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: | |||||||||
Attachments: |
|
Description
Karel Srot
2013-01-21 16:37:30 UTC
missing restorecon ? [mgrepl@rhel6 ~]$ matchpathcon /var/named/chroot/etc/localtime /var/named/chroot/etc/localtime system_u:object_r:locale_t:s0 [mgrepl@rhel6 ~]$ rpm -qf /var/named/chroot/etc/localtime bind-chroot-9.8.2-0.16.rc1.el6.x86_64 It should work.Or did you create it manually? It is created by rpm postinstall script. Sorry for not mentioning it. # rpm -q --scripts bind-chroot postinstall scriptlet (using /bin/sh): if [ "$1" -gt 0 ]; then [ -e /var/named/chroot/dev/random ] || \ /bin/mknod /var/named/chroot/dev/random c 1 8 [ -e /var/named/chroot/dev/zero ] || \ /bin/mknod /var/named/chroot/dev/zero c 1 5 [ -e /var/named/chroot/dev/null ] || \ /bin/mknod /var/named/chroot/dev/null c 1 3 rm -f /var/named/chroot/etc/localtime cp /etc/localtime /var/named/chroot/etc/localtime if ! grep -q '^ROOTDIR=' /etc/sysconfig/named; then echo 'ROOTDIR=/var/named/chroot' >> /etc/sysconfig/named /sbin/service named try-restart > /dev/null 2>&1 || :; fi fi; :; preuninstall scriptlet (using /bin/sh): if [ "$1" -eq 0 ]; then rm -f /var/named/chroot/dev/{random,zero,null} rm -f /var/named/chroot/etc/localtime if grep -q '^ROOTDIR=' /etc/sysconfig/named; then # NOTE: Do NOT call `service named try-restart` because chroot # files will remain mounted. START=no [ -e /var/lock/subsys/named ] && START=yes /sbin/service named stop > /dev/null 2>&1 || :; sed -i -e '/^ROOTDIR=.*/d' /etc/sysconfig/named if [ "x$START" = xyes ]; then /sbin/service named start > /dev/null 2>&1 || :; fi fi fi :; posttrans scriptlet (using /bin/sh): if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then [ -x /sbin/restorecon ] && /sbin/restorecon /var/named/chroot/dev/* > /dev/null 2>&1; fi; :; Created attachment 732658 [details]
Restore SELinux context on /var/named/chroot/etc/localtime
Created attachment 732659 [details]
Restore SELinux context on /var/named/chroot/etc/localtime
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate, in the next release of Red Hat Enterprise Linux. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-1373.html |