From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH 1/1] Remove the hard-coding of selinuxfs mountpoint
Date: Wed, 5 Jun 2013 13:35:29 -0400 [thread overview]
Message-ID: <51AF76E1.30304@tresys.com> (raw)
In-Reply-To: <1369733330-12010-1-git-send-email-qingtao.cao.au@gmail.com>
On 05/28/13 05:28, Qingtao Cao wrote:
> 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@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
I'd like to do something like this, but I don't think this way is the best, as Gentoo, for example, has two mounts of selinuxfs (in /sys/fs/ and / for compat). It seems like updating the selinuxconfig tool would be best, but Fedora doesn't include it. We might have to grep it from sestatus output. Or we could update the libselinux swig wrapper to export selinux_mnt, so we could use a python script to find the mount point.
--
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com
next prev parent reply other threads:[~2013-06-05 17:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-28 9:28 [refpolicy] [PATCH 1/1] Remove the hard-coding of selinuxfs mountpoint Qingtao Cao
2013-06-05 17:35 ` Christopher J. PeBenito [this message]
2013-06-06 4:29 ` Qingtao Cao
2013-06-06 13:29 ` Christopher J. PeBenito
2013-06-07 6:35 ` Qingtao Cao
-- strict thread matches above, loose matches on Subject: below --
2013-05-27 1:10 Qingtao Cao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51AF76E1.30304@tresys.com \
--to=cpebenito@tresys.com \
--cc=refpolicy@oss.tresys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.