Change in vdsm[master]: configNet: grant proper selinux context to ifcfg-*
danken at redhat.com
danken at redhat.com
Sun Aug 26 15:22:00 UTC 2012
Dan Kenigsberg has uploaded a new change for review.
Change subject: configNet: grant proper selinux context to ifcfg-*
......................................................................
configNet: grant proper selinux context to ifcfg-*
Bug-Id: BZ#838347
Change-Id: Ic3cb63872794367a7c6fa76cc753698c9402b449
Signed-off-by: Dan Kenigsberg <danken at redhat.com>
---
M vdsm/configNetwork.py
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/78/7478/1
diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index 62a3ccc..ae8bedf 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -28,6 +28,7 @@
import shutil
import libvirt
+import selinux
from vdsm import constants
from vdsm import utils
@@ -370,6 +371,11 @@
self._backup(fileName)
open(fileName, 'w').write(configuration)
os.chmod(fileName, 0664)
+ try:
+ selinux.restorecon(fileName)
+ except:
+ logging.debug('ignoring restorecon error in case SElinux is '
+ 'disabled', exc_info=True)
def _createConfFile(self, conf, name, ipaddr=None, netmask=None,
gateway=None, bootproto=None, mtu=None, onboot='yes', **kwargs):
--
To view, visit http://gerrit.ovirt.org/7478
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic3cb63872794367a7c6fa76cc753698c9402b449
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken at redhat.com>
More information about the vdsm-patches
mailing list