summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2009-06-26 14:50:44 -0400
committerJeremy Katz <katzj@redhat.com>2009-06-26 14:51:12 -0400
commitc329ea2f4d4aeb058e78bcc73e9cff90a130a193 (patch)
treec1e9604c91de8f8a0d6136852a22084264f5275d
parentfc2e29ef0b3ef617f7536606c7287105859a68a8 (diff)
downloadanaconda-c329ea2f4d4aeb058e78bcc73e9cff90a130a193.tar.gz
anaconda-c329ea2f4d4aeb058e78bcc73e9cff90a130a193.tar.xz
anaconda-c329ea2f4d4aeb058e78bcc73e9cff90a130a193.zip
Ensure we set the SELinux context correctly on symlinks (#505054)
-rw-r--r--livecd.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/livecd.py b/livecd.py
index b186d0089..900eb8c61 100644
--- a/livecd.py
+++ b/livecd.py
@@ -65,6 +65,8 @@ def copytree(src, dst, symlinks=False, preserveOwner=False,
if symlinks and os.path.islink(srcname):
linkto = os.readlink(srcname)
os.symlink(linkto, dstname)
+ if preserveSelinux:
+ selinux.lsetfilecon(dstname, selinux.lgetfilecon(srcname)[1])
elif os.path.isdir(srcname):
copytree(srcname, dstname, symlinks, preserveOwner, preserveSelinux)
else: