summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/dbapi/vartree.py9
1 files 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])