Bug 1122907 - SELinux relabel is not working properly and preventing NetworkManager from writing /etc/resolv.conf
Summary: SELinux relabel is not working properly and preventing NetworkManager from wr...
Status: CLOSED DUPLICATE of bug 1089100
Alias: None
Product: Fedora
Classification: Fedora
Component: libguestfs
Version: 20
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-24 11:24 UTC by Renich Bon Ciric
Modified: 2014-07-24 11:35 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-07-24 11:35:58 UTC

Attachments (Terms of Use)

Description Renich Bon Ciric 2014-07-24 11:24:41 UTC
Description of problem:
I am using virt-builder to build a CentOS Guest. I enabled selinux relabel but it's not working properly. /etc/resolv.conf ends up with an etc_t label; while it should have a net_conf_t label.

Version-Release number of selected component (if applicable):

How reproducible:
First remove lines 34-36 on https://github.com/renich/gce-images-centos/blob/master/virt-builder/setup

Then, build with (until line 80):

Actual results:
My /etc/resolv.conf has the wrong label.

Comment 1 Pino Toscano 2014-07-24 11:35:58 UTC
This is the same as bug #1089100, and it is now being marked as duplicated of it.

As a workaround, you should be able to get proper SELinux labels by using virt-customize with no network, i.e.:
  $ virt-customize --selinux-relabel --no-network -a yourimage

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

Note You need to log in before you can comment on or make changes to this bug.