From 7d2520af04ef1e7aefa8a698ca2fd8e732e76e14 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Jan 06 2009 15:44:49 +0000 Subject: - Fix restorecon python code --- diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch index aac0b92..a48f969 100644 --- a/libselinux-rhat.patch +++ b/libselinux-rhat.patch @@ -110,7 +110,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0 + +def restorecon(path, recursive=False): + """ Restore SELinux context on a given path """ -+ mode = os.stat(path)[stat.ST_MODE] ++ mode = os.lstat(path)[stat.ST_MODE] + status, context = matchpathcon(path, mode) + if status == 0: + lsetfilecon(path, context) @@ -153,7 +153,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_python.i libs + +def restorecon(path, recursive=False): + """ Restore SELinux context on a given path """ -+ mode = os.stat(path)[stat.ST_MODE] ++ mode = os.lstat(path)[stat.ST_MODE] + status, context = matchpathcon(path, mode) + if status == 0: + lsetfilecon(path, context) diff --git a/libselinux.spec b/libselinux.spec index e3ee98c..47b8182 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -5,7 +5,7 @@ Summary: SELinux library and simple utilities Name: libselinux Version: 2.0.77 -Release: 1%{?dist} +Release: 2%{?dist} License: Public Domain Group: System Environment/Libraries Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz @@ -164,6 +164,9 @@ exit 0 %{ruby_sitearch}/selinux.so %changelog +* Tue Jan 6 2009 Dan Walsh - 2.0.77-2 +- Fix restorecon python code + * Tue Jan 6 2009 Dan Walsh - 2.0.77-1 - Update to upstream