Skip to contentSkip to conversation

policycoreutils: 'fixfiles check' should not change anything

PATCH Applied Petr Lautrbach 2 participants 2 messages Aug 9, 2016 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 policycoreutils: 'fixfiles check' should not change anything

-n was not being passed down to restorecon properly in the code path for -C and -N

---
 policycoreutils/scripts/fixfiles | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
policycoreutils/scripts/fixfiles +4 -3
index 5c29eb9..fa43a53 100755
@@ -150,8 +150,9 @@ fi
 #
 newer() {
     DATE=$1
+    shift
     for m in `echo $FILESYSTEMSRW`; do
-	find $m -mount -newermt $DATE -print0 2>/dev/null | ${RESTORECON} ${FORCEFLAG} ${VERBOSE} -i -0 -f -
+	find $m -mount -newermt $DATE -print0 2>/dev/null | ${RESTORECON} ${FORCEFLAG} ${VERBOSE} $* -i -0 -f -
     done;
 
 }
@@ -190,7 +191,7 @@ if [ -f ${PREFC} -a -x /usr/bin/diff ]; then
 		  esac; \
 	       fi; \
 	    done | \
-	${RESTORECON} ${VERBOSE} -i -f - -R `exclude_dirs`; \
+	${RESTORECON} ${VERBOSE} -i -f - -R $* `exclude_dirs`; \
 	rm -f ${TEMPFILE} ${PREFCTEMPFILE}
 fi
 }
@@ -222,7 +223,7 @@ if [ ! -z "$PREFC" ]; then
     exit $?
 fi
 if [ ! -z "$BOOTTIME" ]; then
-    newer $BOOTTIME
+    newer $BOOTTIME $*
     exit $?
 fi
 [ -x /usr/sbin/genhomedircon ] && /usr/sbin/genhomedircon
Signature · 1 line
1.8.3.1
Applied
#1 lore raw
Quoted 5 lines · Petr Lautrbach

-n was not being passed down to restorecon properly in the code path for -C and -N

Applied.

Thanks,
Jim

Quoted 38 lines
---
 policycoreutils/scripts/fixfiles | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
policycoreutils/scripts/fixfiles +4 -3
index 5c29eb9..fa43a53 100755
@@ -150,8 +150,9 @@ fi
 #
 newer() {
     DATE=$1
+    shift
     for m in `echo $FILESYSTEMSRW`; do
-	find $m -mount -newermt $DATE -print0 2>/dev/null | ${RESTORECON} ${FORCEFLAG} ${VERBOSE} -i -0 -f -
+	find $m -mount -newermt $DATE -print0 2>/dev/null | ${RESTORECON} ${FORCEFLAG} ${VERBOSE} $* -i -0 -f -
     done;
 
 }
@@ -190,7 +191,7 @@ if [ -f ${PREFC} -a -x /usr/bin/diff ]; then
 		  esac; \
 	       fi; \
 	    done | \
-	${RESTORECON} ${VERBOSE} -i -f - -R `exclude_dirs`; \
+	${RESTORECON} ${VERBOSE} -i -f - -R $* `exclude_dirs`; \
 	rm -f ${TEMPFILE} ${PREFCTEMPFILE}
 fi
 }
@@ -222,7 +223,7 @@ if [ ! -z "$PREFC" ]; then
     exit $?
 fi
 if [ ! -z "$BOOTTIME" ]; then
-    newer $BOOTTIME
+    newer $BOOTTIME $*
     exit $?
 fi
 [ -x /usr/sbin/genhomedircon ] && /usr/sbin/genhomedircon
Signature · 2 lines
James Carter <[email protected]>
National Security Agency