From a5832535ef4e08143bfe93399f68fd22ba24f183 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 14 Aug 2009 05:30:38 +0000 Subject: [PATCH] Use portage's selinux wrapper module for mkdir calls. svn path=/main/trunk/; revision=14020 --- pym/portage/dbapi/vartree.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 0b4cf2bde..18c387ee7 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -38,6 +38,7 @@ from portage import listdir, dep_expand, digraph, flatten, key_expand, \ # This is a special version of the os module, wrapped for unicode support. from portage import os from portage import _unicode_encode +from portage import selinux from portage.cache.mappings import slot_dict_class @@ -3857,9 +3858,7 @@ class dblink(object): level=logging.ERROR, noiselevel=-1) #now create our directory if self.settings.selinux_enabled(): - import selinux - sid = selinux.get_sid(mysrc) - selinux.secure_mkdir(mydest,sid) + selinux.mkdir(mydest, mysrc) else: os.mkdir(mydest) if bsd_chflags: @@ -3870,9 +3869,7 @@ class dblink(object): else: #destination doesn't exist if self.settings.selinux_enabled(): - import selinux - sid = selinux.get_sid(mysrc) - selinux.secure_mkdir(mydest, sid) + selinux.mkdir(mydest, mysrc) else: os.mkdir(mydest) os.chmod(mydest, mystat[0]) -- 2.26.2