[patch] fixfiles -C: relabel all file contexts that have changed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This fixes the situation where one path is a substring of another path, but not a prefix.  For example, if /lib and /var/lib have both changed in the file_contexts file, then /var/lib would not be selected for relabel even though it should.



Marshall Miller

Index: policycoreutils/scripts/fixfiles
===================================================================
--- policycoreutils/scripts/fixfiles	(revision 2748)
+++ policycoreutils/scripts/fixfiles	(working copy)
@@ -84,7 +84,7 @@
 	    do if ! echo "$pattern" | grep -q -f ${TEMPFILE} 2>/dev/null; then \
                   echo "$pattern"; \
                   case "$pattern" in *"*") \
-	               echo "$pattern" | sed 's,\*$,,g' >> ${TEMPFILE};;  
+	               echo "$pattern" | sed -e 's,^,^,' -e 's,\*$,,g' >> ${TEMPFILE};;  
                   esac; \
                fi; \
             done | \

[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux