[policycoreutils/f18] Handle audit2allow -b in foreign locales

Daniel J Walsh dwalsh at fedoraproject.org
Tue Oct 16 19:00:39 UTC 2012


commit 9550bc1499a1d16d58676d2945630e31940a6e12
Author: rhatdan <dwalsh at redhat.com>
Date:   Tue Oct 16 15:00:11 2012 -0400

    Handle audit2allow -b in foreign locales

 policycoreutils-sepolgen.patch |   14 ++++++++++++++
 policycoreutils.spec           |    5 +++++
 2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/policycoreutils-sepolgen.patch b/policycoreutils-sepolgen.patch
index e69de29..f536ce8 100644
--- a/policycoreutils-sepolgen.patch
+++ b/policycoreutils-sepolgen.patch
@@ -0,0 +1,14 @@
+diff --git a/sepolgen/src/sepolgen/audit.py b/sepolgen/src/sepolgen/audit.py
+index 73c60f6..d636091 100644
+--- a/sepolgen/src/sepolgen/audit.py
++++ b/sepolgen/src/sepolgen/audit.py
+@@ -38,8 +38,7 @@ def get_audit_boot_msgs():
+     off=float(fd.read().split()[0])
+     fd.close
+     s = time.localtime(time.time() - off)
+-    date = time.strftime("%D/%Y", s).split("/")
+-    bootdate="%s/%s/%s" % (date[0], date[1], date[3])
++    bootdate = time.strftime("%x", s)
+     boottime = time.strftime("%X", s)
+     output = subprocess.Popen(["/sbin/ausearch", "-m", "AVC,USER_AVC,MAC_POLICY_LOAD,DAEMON_START,SELINUX_ERR", "-ts", bootdate, boottime],
+                               stdout=subprocess.PIPE).communicate()[0]
diff --git a/policycoreutils.spec b/policycoreutils.spec
index 2b64e23..48e3147 100644
--- a/policycoreutils.spec
+++ b/policycoreutils.spec
@@ -22,6 +22,7 @@ Source6: selinux-polgengui.desktop
 Source8: policycoreutils_man_ru2.tar.bz2
 Source10: restorecond.service
 Patch:	 policycoreutils-rhat.patch
+Patch1:	 policycoreutils-sepolgen.patch
 Obsoletes: policycoreutils < 2.0.61-2
 Conflicts: filesystem < 3
 Provides: /sbin/fixfiles
@@ -62,6 +63,7 @@ context.
 %prep
 %setup -q -a 1 
 %patch -p2 -b .rhat
+%patch1 -p2 -b .sepolgen -d sepolgen-%{sepolgenver}
 
 %build
 make LSPP_PRIV=y SBINDIR="%{_sbindir}" LIBDIR="%{_libdir}" CFLAGS="%{optflags} -fPIE" LDFLAGS="-pie -Wl,-z,relro" all 
@@ -328,6 +330,9 @@ The policycoreutils-restorecond package contains the restorecond service.
 %{_bindir}/systemctl try-restart restorecond.service >/dev/null 2>&1 || :
 
 %changelog
+* Tue Oct 16 2012 Dan Walsh <dwalsh at redhat.com> - 2.1.12-11
+- Handle audit2allow -b in foreign locales
+
 * Tue Oct 16 2012 Dan Walsh <dwalsh at redhat.com> - 2.1.12-10
 - Update sepolicy generate with patch to create spec file and man page.
 - Patch initiated by Miroslav Grepl


More information about the scm-commits mailing list