diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch index 2ccf200..397c6d4 100644 --- a/libselinux-rhat.patch +++ b/libselinux-rhat.patch @@ -164,7 +164,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_python.i libs +%pythoncode %{ + -+import shutil, os ++import shutil, os, stat + +def restorecon(path, recursive=False): + """ Restore SELinux context on a given path """ @@ -175,7 +175,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_python.i libs + if recursive: + os.path.walk(path, lambda arg, dirname, fnames: + map(restorecon, [os.path.join(dirname, fname) -+ s for fname in fnames]), None) ++ for fname in fnames]), None) + +def copytree(src, dest): + """ An SELinux-friendly shutil.copytree method """