From 7313e2e74690414bd3cf39f22cf2df4f3209ae4f Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 26 Aug 2009 19:06:23 +0000 Subject: [PATCH] - Make sure /root is not used in genhomedircon --- libsemanage-rhat.patch | 22 ++++++++++++++++------ libsemanage.spec | 5 ++++- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/libsemanage-rhat.patch b/libsemanage-rhat.patch index 280608e..b7b5535 100644 --- a/libsemanage-rhat.patch +++ b/libsemanage-rhat.patch @@ -1,7 +1,7 @@ -diff --exclude-from=exclude -N -u -r nsalibsemanage/src/genhomedircon.c libsemanage-2.0.33/src/genhomedircon.c +diff --exclude-from=exclude -N -u -r nsalibsemanage/src/genhomedircon.c libsemanage-2.0.35/src/genhomedircon.c --- nsalibsemanage/src/genhomedircon.c 2008-08-28 09:34:24.000000000 -0400 -+++ libsemanage-2.0.33/src/genhomedircon.c 2009-07-15 10:32:20.000000000 -0400 -@@ -304,6 +304,10 @@ ++++ libsemanage-2.0.35/src/genhomedircon.c 2009-08-26 15:05:01.000000000 -0400 +@@ -304,10 +304,20 @@ continue; if (!semanage_list_find(shells, pwbuf->pw_shell)) continue; @@ -12,7 +12,17 @@ diff --exclude-from=exclude -N -u -r nsalibsemanage/src/genhomedircon.c libseman if (strcmp(pwbuf->pw_dir, "/") == 0) continue; if (semanage_str_count(pwbuf->pw_dir, '/') <= 1) -@@ -794,6 +798,11 @@ + continue; ++ ++ if (strcmp(pwbuf->pw_dir, "/root") == 0) { ++ /* don't relabel /root*/ ++ continue; ++ } ++ + if (!(path = strdup(pwbuf->pw_dir))) { + break; + } +@@ -794,6 +804,11 @@ * /root */ continue; } @@ -24,9 +34,9 @@ diff --exclude-from=exclude -N -u -r nsalibsemanage/src/genhomedircon.c libseman if (push_user_entry(&head, name, seuname, prefix, pwent->pw_dir) != STATUS_SUCCESS) { *errors = STATUS_ERR; -diff --exclude-from=exclude -N -u -r nsalibsemanage/src/semanage.conf libsemanage-2.0.33/src/semanage.conf +diff --exclude-from=exclude -N -u -r nsalibsemanage/src/semanage.conf libsemanage-2.0.35/src/semanage.conf --- nsalibsemanage/src/semanage.conf 2008-08-28 09:34:24.000000000 -0400 -+++ libsemanage-2.0.33/src/semanage.conf 2009-07-15 10:30:33.000000000 -0400 ++++ libsemanage-2.0.35/src/semanage.conf 2009-08-05 15:21:56.000000000 -0400 @@ -35,4 +35,4 @@ # given in . Change this setting if a different # version is necessary. diff --git a/libsemanage.spec b/libsemanage.spec index c63a350..36f67c1 100644 --- a/libsemanage.spec +++ b/libsemanage.spec @@ -3,7 +3,7 @@ Summary: SELinux binary policy manipulation library Name: libsemanage Version: 2.0.35 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://www.nsa.gov/selinux/archives/libsemanage-%{version}.tgz @@ -91,6 +91,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_libdir}/python*/site-packages/* %changelog +* Wed Aug 26 2009 Dan Walsh - 2.0.35-2 +- Make sure /root is not used in genhomedircon + * Wed Aug 5 2009 Dan Walsh - 2.0.35-1 * Revert hard linking of files between tmp/active/previous. * Enable configuration of bzip behavior from Stephen Smalley.