policycoreutils/sandbox: Fix sandbox to propagate specified MCS/MLS Security Level.

If "level" option is used to start sandbox commands, this level is not propagated
to specified  homedir and tmpdir directories. See rhbz #1279006.

Signed-off-by: Miroslav Grepl <mgrepl@redhat.com>
This commit is contained in:
Miroslav Grepl 2015-11-14 08:48:40 +01:00 committed by James Carter
parent 50c349df8f
commit 0f4620d611

View File

@ -424,9 +424,6 @@ sandbox [-h] [-l level ] [-[X|M] [-H homedir] [-T tempdir]] [-I includefile ] [-
self.__filecon = "%s:object_r:sandbox_file_t:%s" % (con[0], level)
def __setup_dir(self):
if self.__options.level or self.__options.session:
return
if self.__options.homedir:
selinux.chcon(self.__options.homedir, self.__filecon, recursive=True)
self.__homedir = self.__options.homedir