From 95b7569bbb5d99d68c330fa2ca4c27a2147a5c96 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Mon, 30 Jul 2012 12:18:06 +0000 Subject: 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 --- nova/virt/disk/api.py | 4 +--- 1 file changed, 1 insertion(+), 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): -- cgit