From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] Questions about genfscon
Date: Tue, 10 Jul 2012 08:33:01 -0400 [thread overview]
Message-ID: <4FFC20FD.9000907@tresys.com> (raw)
In-Reply-To: <CAO-4OdFnoJ9UOLNyYcLJV4DBE59OVeuRBvn1LqMRf-co5K2DCw@mail.gmail.com>
On 07/09/12 14:35, Haiqing Jiang wrote:
> Thanks for reading this email. I have a quick question about the syntax of "genfscon".
> I want to re-label some files' context under /proc directory. From current implementation I can find that
> all the contexts under /proc using genfscon syntax in the file of "ocontext". Then I tried the following cases,
> and the confusions are coming:
>
> Case 1: I imitated the labeling syntax in the file of "ocontext", like: genfscon proc /XXX u:object_r:xxx:s0;
> The contexts are changed after re-built. (Working fine)
> Case 2: I didn't modify in the "ocontext" file, instead I modify in the file of "file_context", like: genfscon proc /XXX u:object_r:xxx:s0; It doesn't work. I cannot find the new contexts. (Not working)
> Case 3: I didn't modify in the "ocontext" file, instead I modify in the file of "file_context" and without using genfscon syntax, like: /proc/XXX u:object_r:xxx:s0; It doesn't work. I cannot find the new contexts. (Not working)
> Case 4: I didn't modify in the "ocontext" file, instead I modify in the file of "sepolicy.fc" under /device/samsung/tuna/ and using "genfscon" syntax and regular label syntax, like: genfscon proc /XXX u:object_r:xxx:s0 and /proc/XXX u:object_r:xxx:s0; They don't work. I cannot find the new contexts. (Not working)
>
> In all, the only way I can do is to label /proc files contexts in the file of "ocontext" and to use "genfscon" syntax.
> Could someone explain the reasons? Thanks a lot.
The short answer is its because proc is a pseudo filesystem and has no persistent storage. File_contexts is used to initialize the labeling of filesystems with persistent storage, e.g. ext4. If you're looking for further discussion, the NSA SELinux mail list is more appropriate.
--
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com
prev parent reply other threads:[~2012-07-10 12:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-09 18:35 [refpolicy] Questions about genfscon Haiqing Jiang
2012-07-10 12:33 ` Christopher J. PeBenito [this message]
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=4FFC20FD.9000907@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.