* Fri Aug 26 2005 Dan Walsh <dwalsh@redhat.com> 1.25.7-2

- Change to use *getfilecon_raw functions
This commit is contained in:
Daniel J Walsh 2005-08-26 18:23:35 +00:00
parent 744ff8dd67
commit 1320e158e3
2 changed files with 31 additions and 33 deletions

View File

@ -1,31 +1,24 @@
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-1.25.5/scripts/fixfiles diff --exclude-from=exclude -N -u -r nsapolicycoreutils/restorecon/restorecon.c policycoreutils-1.25.7/restorecon/restorecon.c
--- nsapolicycoreutils/scripts/fixfiles 2005-05-20 13:15:12.000000000 -0400 --- nsapolicycoreutils/restorecon/restorecon.c 2005-07-27 09:58:39.000000000 -0400
+++ policycoreutils-1.25.5/scripts/fixfiles 2005-08-22 17:25:15.000000000 -0400 +++ policycoreutils-1.25.7/restorecon/restorecon.c 2005-08-26 14:20:10.000000000 -0400
@@ -62,6 +62,7 @@ @@ -186,7 +186,7 @@
TEMPFILE=`mktemp ${FC}.XXXXXXXXXX` freecon(scontext);
test -z "$TEMPFILE" && exit return 0;
/usr/bin/diff $PREFC $FC | grep '^[<>]'|cut -c3-| grep ^/ | \
+ egrep -v '(^/home|^/root|^/tmp|^/dev)' |\
sed -r -e 's,[[:blank:]].*,,g' \
-e 's|\(([/[:alnum:]]+)\)\?|{\1,}|g' \
-e 's|([/[:alnum:]])\?|{\1,}|g' \
@@ -70,7 +71,9 @@
-e 's|\[.*|*|g' \
-e 's|\.\*.*|*|g' \
-e 's|\.\+.*|*|g' | \
- sort -d -u | \
+ # These two sorts need to be separate commands \
+ sort -u | \
+ sort -d | \
while read pattern ; \
do if ! echo "$pattern" | grep -q -f ${TEMPFILE} 2>/dev/null; then \
echo "$pattern"; \
@@ -80,7 +83,7 @@
fi; \
done | \
while read pattern ; do find $pattern \( -fstype ext2 -o -fstype ext3 -o -fstype jfs -o -fstype xfs \) -print; done 2> /dev/null | \
- ${RESTORECON} $2 -v -e /root -e /home -e /tmp -e /var/tmp -e /dev -f -
+ ${RESTORECON} $2 -v -f -
rm -f ${TEMPFILE}
fi
} }
- retcontext=lgetfilecon(filename,&prev_context);
+ retcontext=lgetfilecon_raw(filename,&prev_context);
if (retcontext >= 0 || errno == ENODATA) {
int customizable=0;
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/setfiles/setfiles.c policycoreutils-1.25.7/setfiles/setfiles.c
--- nsapolicycoreutils/setfiles/setfiles.c 2005-04-11 16:00:46.000000000 -0400
+++ policycoreutils-1.25.7/setfiles/setfiles.c 2005-08-26 14:20:28.000000000 -0400
@@ -285,7 +285,7 @@
}
/* Get the current context of the file. */
- ret = lgetfilecon(my_file, &context);
+ ret = lgetfilecon_raw(my_file, &context);
if (ret < 0) {
if (errno == ENODATA) {
context = malloc(10);

View File

@ -1,13 +1,14 @@
%define libselinuxver 1.23.1-1 %define libselinuxver 1.25.4-1
%define libsepolver 1.7.20-1 %define libsepolver 1.7.20-1
%define libsemanagever 1.1.3-1 %define libsemanagever 1.1.3-1
Summary: SELinux policy core utilities. Summary: SELinux policy core utilities.
Name: policycoreutils Name: policycoreutils
Version: 1.25.7 Version: 1.25.7
Release: 1 Release: 2
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
Patch: policycoreutils-rhat.patch
BuildRequires: libselinux-devel >= %{libselinuxver} pam-devel libsepol-devel >= %{libsepolver} libsemanage-devel >= %{libsemanagever} BuildRequires: libselinux-devel >= %{libselinuxver} pam-devel libsepol-devel >= %{libsepolver} libsemanage-devel >= %{libsemanagever}
@ -34,6 +35,7 @@ context.
%prep %prep
%setup -q %setup -q
%patch -p1 -b .rhat
%build %build
make LIBDIR="%{_libdir}" CFLAGS="%{optflags}" all make LIBDIR="%{_libdir}" CFLAGS="%{optflags}" all
@ -86,6 +88,9 @@ rm -rf ${RPM_BUILD_ROOT}
%config(noreplace) %{_sysconfdir}/sestatus.conf %config(noreplace) %{_sysconfdir}/sestatus.conf
%changelog %changelog
* Fri Aug 26 2005 Dan Walsh <dwalsh@redhat.com> 1.25.7-2
- Change to use *getfilecon_raw functions
* Thu Aug 25 2005 Dan Walsh <dwalsh@redhat.com> 1.25.7-1 * Thu Aug 25 2005 Dan Walsh <dwalsh@redhat.com> 1.25.7-1
- Update to match NSA - Update to match NSA
* Merged patch for fixfiles -C from Dan Walsh. * Merged patch for fixfiles -C from Dan Walsh.