[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH] Ensure we set the SELinux context correctly on symlinks (#505054)
- From: Jeremy Katz <katzj redhat com>
- To: anaconda-devel-list redhat com
- Subject: [PATCH] Ensure we set the SELinux context correctly on symlinks (#505054)
- Date: Fri, 26 Jun 2009 14:51:24 -0400
---
livecd.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/livecd.py b/livecd.py
index b186d00..900eb8c 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:
--
1.6.1
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]