[shadow-utils] discard obsolete matchpathcon cache after semanage_commit()

Tomáš Mráz tmraz at fedoraproject.org
Wed Sep 10 08:28:59 UTC 2014


commit af13db915f24164d6326927f9b7a3a50599f6079
Author: Tomas Mraz <tmraz at fedoraproject.org>
Date:   Wed Sep 10 10:28:53 2014 +0200

    discard obsolete matchpathcon cache after semanage_commit()

 shadow-4.1.5.1-selinux.patch |   28 ++++++++++++++++++++++++++--
 shadow-utils.spec            |    5 ++++-
 2 files changed, 30 insertions(+), 3 deletions(-)
---
diff --git a/shadow-4.1.5.1-selinux.patch b/shadow-4.1.5.1-selinux.patch
index adedf0f..4ac32d2 100644
--- a/shadow-4.1.5.1-selinux.patch
+++ b/shadow-4.1.5.1-selinux.patch
@@ -1,6 +1,30 @@
+diff -up shadow-4.1.5.1/lib/semanage.c.selinux shadow-4.1.5.1/lib/semanage.c
+--- shadow-4.1.5.1/lib/semanage.c.selinux	2012-01-08 17:35:44.000000000 +0100
++++ shadow-4.1.5.1/lib/semanage.c	2014-09-10 10:11:55.417506128 +0200
+@@ -294,6 +294,9 @@ int set_seuser (const char *login_name,
+ 
+ 	ret = 0;
+ 
++        /* drop obsolete matchpathcon cache */
++        matchpathcon_fini();
++
+ done:
+ 	semanage_seuser_key_free (key);
+ 	semanage_handle_destroy (handle);
+@@ -369,6 +372,10 @@ int del_seuser (const char *login_name)
+ 	}
+ 
+ 	ret = 0;
++
++        /* drop obsolete matchpathcon cache */
++        matchpathcon_fini();
++
+ done:
+ 	semanage_handle_destroy (handle);
+ 	return ret;
 diff -up shadow-4.1.5.1/src/useradd.c.selinux shadow-4.1.5.1/src/useradd.c
---- shadow-4.1.5.1/src/useradd.c.selinux	2014-08-28 16:36:09.889422103 +0200
-+++ shadow-4.1.5.1/src/useradd.c	2014-08-28 17:28:04.828166192 +0200
+--- shadow-4.1.5.1/src/useradd.c.selinux	2014-09-10 10:10:18.791280619 +0200
++++ shadow-4.1.5.1/src/useradd.c	2014-09-10 10:10:18.798280781 +0200
 @@ -1850,6 +1850,7 @@ static void create_mail (void)
   */
  int main (int argc, char **argv)
diff --git a/shadow-utils.spec b/shadow-utils.spec
index 97923b7..e3d6b90 100644
--- a/shadow-utils.spec
+++ b/shadow-utils.spec
@@ -1,7 +1,7 @@
 Summary: Utilities for managing accounts and shadow password files
 Name: shadow-utils
 Version: 4.1.5.1
-Release: 19%{?dist}
+Release: 20%{?dist}
 Epoch: 2
 URL: http://pkg-shadow.alioth.debian.org/
 Source0: http://pkg-shadow.alioth.debian.org/releases/shadow-%{version}.tar.bz2
@@ -236,6 +236,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man8/vigr.8*
 
 %changelog
+* Wed Sep 10 2014 Tomas Mraz <tmraz at redhat.com> - 2:4.1.5.1-20
+- discard obsolete matchpathcon cache after semanage_commit()
+
 * Tue Sep  9 2014 Tomas Mraz <tmraz at redhat.com> - 2:4.1.5.1-19
 - disallow all-numeric user and group names (#1139318)
 


More information about the scm-commits mailing list