[shadow-utils] free memory associated with SELinux security context

Peter Vrabec pvrabec at fedoraproject.org
Wed Nov 16 16:17:52 UTC 2011


commit 20341fa20129ee96be28324ee42963bfe64511d9
Author: Peter Vrabec <pvrabec at redhat.com>
Date:   Wed Nov 16 17:17:29 2011 +0100

    free memory associated with SELinux security context

 shadow-4.1.4.3-selinux.patch |   15 +++++++++++++++
 shadow-utils.spec            |    7 ++++++-
 2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/shadow-4.1.4.3-selinux.patch b/shadow-4.1.4.3-selinux.patch
new file mode 100644
index 0000000..25404b3
--- /dev/null
+++ b/shadow-4.1.4.3-selinux.patch
@@ -0,0 +1,15 @@
+diff -up shadow-4.1.4.3/lib/commonio.c.selinux shadow-4.1.4.3/lib/commonio.c
+--- shadow-4.1.4.3/lib/commonio.c.selinux	2011-02-13 18:58:23.000000000 +0100
++++ shadow-4.1.4.3/lib/commonio.c	2011-11-16 17:09:46.615837659 +0100
+@@ -921,10 +921,10 @@ int commonio_close (struct commonio_db *
+ 
+ #ifdef WITH_SELINUX
+ 	if (db->scontext != NULL) {
+-		if (NULL != old_context) {
+ 		if (setfscreatecon (old_context) < 0) {
+ 			errors++;
+ 		}
++		if (NULL != old_context) {
+ 			freecon (old_context);
+ 			old_context = NULL;
+ 		}
diff --git a/shadow-utils.spec b/shadow-utils.spec
index 4ccde41..18a1090 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.4.3
-Release: 10%{?dist}
+Release: 11%{?dist}
 Epoch: 2
 URL: http://pkg-shadow.alioth.debian.org/
 Source0: http://pkg-shadow.alioth.debian.org/releases/shadow-%{version}.tar.bz2
@@ -23,6 +23,7 @@ Patch11: shadow-4.1.4.3-IDs.patch
 Patch12: shadow-4.1.4.3-man.patch
 #749205
 Patch13: shadow-4.1.4.3-libsemanage.patch
+Patch14: shadow-4.1.4.3-selinux.patch
 License: BSD and GPLv2+
 Group: System Environment/Base
 BuildRequires: libselinux-devel >= 1.25.2-1
@@ -65,6 +66,7 @@ are used for managing group accounts.
 %patch11 -p1 -b .IDs
 %patch12 -p1 -b .man
 %patch13 -p1 -b .libsemanage
+%patch14 -p1 -b .selinux
 
 iconv -f ISO88591 -t utf-8  doc/HOWTO > doc/HOWTO.utf8
 cp -f doc/HOWTO.utf8 doc/HOWTO
@@ -226,6 +228,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man8/vigr.8*
 
 %changelog
+* Wed Nov 16 2011 Peter Vrabec <pvrabec at redhat.com> - 2:4.1.4.3-11
+- free memory associated with SELinux security contexts 
+
 * Wed Nov 09 2011 Peter Vrabec <pvrabec at redhat.com> - 2:4.1.4.3-10
 - replace semanage call by library call
 - useradd man page (#739147)


More information about the scm-commits mailing list