Skip to contentSkip to conversation

policycoreutils/scripts/fixfiles: drop unused functions

PATCH In review Stephen Smalley 1 participant 2 messages Jul 20 – Jul 24 SELinux security module

lore
Share & tools
lore

Stephen Smalley

author maintainer
#0 lore raw

PATCH 1/1 policycoreutils/scripts/fixfiles: drop unused functions

After "policycoreutils/scripts/fixfiles: drop /tmp cleanup", these functions are no long used, so we can remove them.

---
 policycoreutils/scripts/fixfiles | 17 -----------------
 1 file changed, 17 deletions(-)
policycoreutils/scripts/fixfiles +0 -17
index b5f193e1..493c86f9 100755
@@ -66,23 +66,6 @@ for i in $FS; do
 done
 }
 
-#
-# Get the default label returned from the kernel for a file with a label the
-# kernel does not understand
-#
-get_undefined_type() {
-	SELINUXMNT=`grep selinuxfs /proc/self/mountinfo | head -1 | awk '{ print $5 }'`
-	cat ${SELINUXMNT}/initial_contexts/unlabeled | secon -t
-}
-
-#
-# Get the default label for a file without a label
-#
-get_unlabeled_type() {
-	SELINUXMNT=`grep selinuxfs /proc/self/mountinfo | head -1 | awk '{ print $5 }'`
-	cat $SELINUXMNT/initial_contexts/file | secon -t
-}
-
 exclude_dirs_from_relabelling() {
     exclude_from_relabelling=
     if [ -e /etc/selinux/fixfiles_exclude_dirs ]
Signature · 1 line
2.55.0
author maintainer
#1 lore raw
Quoted 5 lines · Stephen Smalley

After "policycoreutils/scripts/fixfiles: drop /tmp cleanup", these functions are no long used, so we can remove them.

Merged.

Quoted 35 lines
---
 policycoreutils/scripts/fixfiles | 17 -----------------
 1 file changed, 17 deletions(-)
policycoreutils/scripts/fixfiles +0 -18
index b5f193e1..493c86f9 100755
@@ -66,23 +66,6 @@ for i in $FS; do
 done
 }
 
-#
-# Get the default label returned from the kernel for a file with a label the
-# kernel does not understand
-#
-get_undefined_type() {
-       SELINUXMNT=`grep selinuxfs /proc/self/mountinfo | head -1 | awk '{ print $5 }'`
-       cat ${SELINUXMNT}/initial_contexts/unlabeled | secon -t
-}
-
-#
-# Get the default label for a file without a label
-#
-get_unlabeled_type() {
-       SELINUXMNT=`grep selinuxfs /proc/self/mountinfo | head -1 | awk '{ print $5 }'`
-       cat $SELINUXMNT/initial_contexts/file | secon -t
-}
-
 exclude_dirs_from_relabelling() {
     exclude_from_relabelling=
     if [ -e /etc/selinux/fixfiles_exclude_dirs ]
--

2.55.0