Skip to contentSkip to conversation

Remove the hard-coding of selinuxfs mountpoint

PATCH New Qingtao Cao 1 participant 1 message May 27, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove the hard-coding of selinuxfs mountpoint

Remove the hard-coding of selinuxfs mountpoint in Rules.monolithic, especially since it has been relocated to /sys/fs/.

---
 Rules.monolithic | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Rules.monolithic +2 -1
index 7c4d035..acac675 100644
@@ -5,7 +5,8 @@
 
 # determine the policy version and current kernel version if possible
 pv := $(shell $(CHECKPOLICY) -V |cut -f 1 -d ' ')
-kv := $(shell cat /selinux/policyvers)
+selinuxfs_mnt = $(shell mount | grep selinuxfs | cut -f 3 -d ' ')
+kv := $(shell cat $(selinuxfs_mnt)/policyvers)
 
 # dont print version warnings if we are unable to determine
 # the currently running kernel's policy version
Signature · 1 line
1.8.1.4