[PATCH] Ensure we set the SELinux context correctly on symlinks (#505054)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 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

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux