Fix fixfiles to use exclude_dirs on fixfiles restore

This commit is contained in:
Dan Walsh 2013-02-28 15:28:38 -05:00
parent 4cc4167518
commit 10913b779d
2 changed files with 28 additions and 1 deletions

View File

@ -1463,6 +1463,30 @@ index 201a988..f5d6e9d 100644
install -m 644 chcat.8 $(MANDIR)/man8/ install -m 644 chcat.8 $(MANDIR)/man8/
clean: clean:
diff --git a/policycoreutils/scripts/fixfiles b/policycoreutils/scripts/fixfiles
index 6901e4d..337d652 100755
--- a/policycoreutils/scripts/fixfiles
+++ b/policycoreutils/scripts/fixfiles
@@ -241,8 +241,8 @@ then
TEMPFCFILE=`mktemp ${FC}.XXXXXXXXXX`
test -z "$TEMPFCFILE" && exit
/bin/cp -p ${FC} ${TEMPFCFILE} &>/dev/null || exit
- exclude_dirs=${exclude_dirs//-e/}
- for p in ${exclude_dirs}
+ tmpdirs=${tempdirs//-e/}
+ for p in ${tmpdirs}
do
p="${p%/}"
p1="${p}(/.*)? -- <<none>>"
@@ -253,7 +253,7 @@ FC=$TEMPFCFILE
fi
if [ -n "${FILESYSTEMSRW}" ]; then
echo "Relabeling `echo ${FILESYSTEMSRW}`"
- ${SETFILES} ${VERBOSE} -q ${FORCEFLAG} $* ${FC} ${FILESYSTEMSRW} 2>&1 | cat >> $LOGFILE
+ ${SETFILES} ${VERBOSE} $exclude_dirs -q ${FORCEFLAG} $* ${FC} ${FILESYSTEMSRW} 2>&1 | cat >> $LOGFILE
else
echo >&2 "fixfiles: No suitable file systems found"
fi
diff --git a/policycoreutils/scripts/fixfiles.8 b/policycoreutils/scripts/fixfiles.8 diff --git a/policycoreutils/scripts/fixfiles.8 b/policycoreutils/scripts/fixfiles.8
index 9ab7334..f263805 100644 index 9ab7334..f263805 100644
--- a/policycoreutils/scripts/fixfiles.8 --- a/policycoreutils/scripts/fixfiles.8

View File

@ -7,7 +7,7 @@
Summary: SELinux policy core utilities Summary: SELinux policy core utilities
Name: policycoreutils Name: policycoreutils
Version: 2.1.14 Version: 2.1.14
Release: 14%{?dist} Release: 15%{?dist}
License: GPLv2 License: GPLv2
Group: System Environment/Base Group: System Environment/Base
# Based on git repository with tag 20101221 # Based on git repository with tag 20101221
@ -324,6 +324,9 @@ The policycoreutils-restorecond package contains the restorecond service.
%{_bindir}/systemctl try-restart restorecond.service >/dev/null 2>&1 || : %{_bindir}/systemctl try-restart restorecond.service >/dev/null 2>&1 || :
%changelog %changelog
* Thu Feb 28 2013 Dan Walsh <dwalsh@redhat.com> - 2.1.14-15
- Fix fixfiles to use exclude_dirs on fixfiles restore
* Thu Feb 28 2013 Dan Walsh <dwalsh@redhat.com> - 2.1.14-14 * Thu Feb 28 2013 Dan Walsh <dwalsh@redhat.com> - 2.1.14-14
- Allow users with symlinked homedirs to work. call realpath on homedir - Allow users with symlinked homedirs to work. call realpath on homedir
- Fix sepolicy reorganization of helper functions. - Fix sepolicy reorganization of helper functions.