summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPádraig Brady <pbrady@redhat.com>2012-07-30 12:18:06 +0000
committerPádraig Brady <pbrady@redhat.com>2012-07-30 16:10:26 +0100
commit95b7569bbb5d99d68c330fa2ca4c27a2147a5c96 (patch)
treebdb19ae9e49fbca81e573e7359ddd552f31e085c
parent7047d854f13f25f306968aa1b068848eea67d71f (diff)
downloadnova-95b7569bbb5d99d68c330fa2ca4c27a2147a5c96.tar.gz
nova-95b7569bbb5d99d68c330fa2ca4c27a2147a5c96.tar.xz
nova-95b7569bbb5d99d68c330fa2ca4c27a2147a5c96.zip
Revert "Check for selinux before setting up selinux."
The existing code used trycmd(readlink) precisely because /etc/selinux might not exist. The presented traceback in the bug is only debug info. Also the change will not work with libguestfs for example, where the nova user can't access mount points mounted by root. After discussion on IRC it was decided to reduce debugging output in a subsequent commit. Reverts: 9bea239f Change-Id: Id07eae5b330332f36ad7caa786593e486aa36469
-rw-r--r--nova/virt/disk/api.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/nova/virt/disk/api.py b/nova/virt/disk/api.py
index af14e3ffc..e55b54fa1 100644
--- a/nova/virt/disk/api.py
+++ b/nova/virt/disk/api.py
@@ -416,9 +416,7 @@ def _inject_key_into_fs(key, fs):
_inject_file_into_fs(fs, keyfile, key_data, append=True)
- selinuxdir = _join_and_check_path_within_fs(fs, 'etc', 'selinux')
- if os.path.exists(selinuxdir):
- _setup_selinux_for_keys(fs)
+ _setup_selinux_for_keys(fs)
def _inject_net_into_fs(net, fs):