From e672e99f9dd0ecd83115e058aec06320f7339f5d Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Dec 19 2008 20:17:53 +0000 Subject: - Strip trailing / for matchpathcon --- diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch index 9559bb8..6c71adb 100644 --- a/libselinux-rhat.patch +++ b/libselinux-rhat.patch @@ -3078,3 +3078,18 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/utils/getdefaultcon.c libseli - return 0; + return ret >= 0; } +diff --exclude-from=exclude -N -u -r nsalibselinux/utils/matchpathcon.c libselinux-2.0.76/utils/matchpathcon.c +--- nsalibselinux/utils/matchpathcon.c 2008-10-28 10:06:51.000000000 -0400 ++++ libselinux-2.0.76/utils/matchpathcon.c 2008-12-19 15:14:20.000000000 -0500 +@@ -101,6 +101,11 @@ + for (i = optind; i < argc; i++) { + int mode = 0; + struct stat buf; ++ int len = strlen(argv[i]); ++ if (len > 1 && argv[i][len - 1 ] == '/') { ++ argv[i][len - 1 ] = '\0'; ++ } ++ + if (lstat(argv[i], &buf) == 0) + mode = buf.st_mode; + diff --git a/libselinux.spec b/libselinux.spec index 741ed0b..26a3713 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -5,7 +5,7 @@ Summary: SELinux library and simple utilities Name: libselinux Version: 2.0.76 -Release: 5%{?dist} +Release: 6%{?dist} License: Public Domain Group: System Environment/Libraries Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz @@ -163,6 +163,9 @@ exit 0 %{ruby_sitearch}/selinux.so %changelog +* Tue Dec 16 2008 Dan Walsh - 2.0.76-6 +- Strip trailing / for matchpathcon + * Tue Dec 16 2008 Dan Walsh - 2.0.76-5 - Fix segfault if seusers file does not work