[refpolicy] [PATCH 1/1] Remove the hard-coding of selinuxfs mountpoint

Qingtao Cao qingtao.cao.au at gmail.com
Tue May 28 05:28:50 EDT 2013


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

Signed-off-by: Qingtao Cao <qingtao.cao.au at gmail.com>
---
 Rules.monolithic | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Rules.monolithic b/Rules.monolithic
index 7c4d035..acac675 100644
--- a/Rules.monolithic
+++ b/Rules.monolithic
@@ -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
-- 
1.8.1.4



More information about the refpolicy mailing list