* Fri Feb 11 2005 Dan Walsh <dwalsh@redhat.com> 1.21.15-8

- Fix genhomedircon regular expression
- Fix exclude in restorecon
This commit is contained in:
Daniel J Walsh 2005-02-11 21:54:08 +00:00
parent b26d374a91
commit a5df24477e
2 changed files with 20 additions and 4 deletions

View File

@ -1,6 +1,21 @@
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/restorecon/restorecon.c policycoreutils-1.21.15/restorecon/restorecon.c
--- nsapolicycoreutils/restorecon/restorecon.c 2005-02-09 10:02:49.000000000 -0500
+++ policycoreutils-1.21.15/restorecon/restorecon.c 2005-02-11 16:08:04.000000000 -0500
@@ -130,6 +130,11 @@
if (len > 0 && filename[len-1]=='/' && (strcmp(filename,"/") != 0)) {
filename[len-1]=0;
}
+
+ if (excludeCtr > 0 && exclude(filename)) {
+ return 0;
+ }
+
if (lstat(filename, &st)!=0) {
fprintf(stderr,"lstat(%s) failed: %s\n", filename,strerror(errno));
return 1;
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon policycoreutils-1.21.15/scripts/genhomedircon diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon policycoreutils-1.21.15/scripts/genhomedircon
--- nsapolicycoreutils/scripts/genhomedircon 2005-01-28 11:16:36.000000000 -0500 --- nsapolicycoreutils/scripts/genhomedircon 2005-01-28 11:16:36.000000000 -0500
+++ policycoreutils-1.21.15/scripts/genhomedircon 2005-02-11 15:06:35.000000000 -0500 +++ policycoreutils-1.21.15/scripts/genhomedircon 2005-02-11 16:52:19.000000000 -0500
@@ -13,38 +13,116 @@ @@ -13,38 +13,116 @@
# #
# ASSUMPTIONS: # ASSUMPTIONS:
@ -219,7 +234,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon po
+ return ret + return ret
+ +
+ def checkExists(self, home): + def checkExists(self, home):
+ return commands.getstatusoutput("grep -E '^%s[^[:alnum:]_-]' %s" % (home, self.getFileContextFile()))[0] + return commands.getstatusoutput("grep -E '^%s[^[:alnum:]%.\_-]' %s" % (home, self.getFileContextFile()))[0]
+ +
+ def getHomeDirs(self): + def getHomeDirs(self):
+ homedirs = [] + homedirs = []

View File

@ -2,7 +2,7 @@ un%define libselinuxver 1.21.9-2
Summary: SELinux policy core utilities. Summary: SELinux policy core utilities.
Name: policycoreutils Name: policycoreutils
Version: 1.21.15 Version: 1.21.15
Release: 7 Release: 8
License: GPL License: GPL
Group: System Environment/Base Group: System Environment/Base
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
@ -81,8 +81,9 @@ rm -rf ${RPM_BUILD_ROOT}
%config(noreplace) %{_sysconfdir}/sestatus.conf %config(noreplace) %{_sysconfdir}/sestatus.conf
%changelog %changelog
* Fri Feb 11 2005 Dan Walsh <dwalsh@redhat.com> 1.21.15-7 * Fri Feb 11 2005 Dan Walsh <dwalsh@redhat.com> 1.21.15-8
- Fix genhomedircon regular expression - Fix genhomedircon regular expression
- Fix exclude in restorecon
* Thu Feb 10 2005 Dan Walsh <dwalsh@redhat.com> 1.21.15-5 * Thu Feb 10 2005 Dan Walsh <dwalsh@redhat.com> 1.21.15-5
- Trap failure on write - Trap failure on write