- Strip trailing / for matchpathcon
This commit is contained in:
parent
0c692a5a64
commit
e672e99f9d
@ -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;
|
||||
|
||||
|
@ -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 <dwalsh@redhat.com> - 2.0.76-6
|
||||
- Strip trailing / for matchpathcon
|
||||
|
||||
* Tue Dec 16 2008 Dan Walsh <dwalsh@redhat.com> - 2.0.76-5
|
||||
- Fix segfault if seusers file does not work
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user