From: dE <de.techno@gmail.com>
To: selinux@tycho.nsa.gov
Subject: Re: What's a policy capability?
Date: Tue, 22 Jul 2014 10:33:25 +0530 [thread overview]
Message-ID: <53CDF09D.4050304@gmail.com> (raw)
In-Reply-To: <53CD0CCB.5080300@tycho.nsa.gov>
On 07/21/14 18:21, Stephen Smalley wrote:
> On 07/19/2014 04:03 AM, dE wrote:
>> I came cross this term and couldn't find much reference to it.
> A mechanism for telling the kernel that your policy supports some new
> feature/capability and therefore it is safe for the kernel to enable the
> corresponding check/logic. Used as a way of supporting new
> checks/features in a backward-compatible manner: old policies will not
> have defined the policy capability for the new feature and therefore
> will not enable the new check/logic by default, while new policies can
> opt into or out of the new check/logic at their discretion.
>
> ls /sys/fs/selinux/policy_capabilities will show the list of policy
> capabilities known to your kernel, while cat
> /sys/fs/selinux/policy_capabilities/<capability_name> will show whether
> that capability was enabled (1) or disabled (0) in the currently loaded
> policy.
>
> seinfo --polcap will list enabled policy capabilities in the current or
> specified policy.
>
> The set of policy capabilities to be enabled in the policy is declared
> in refpolicy/policy/policy_capabilities in the refpolicy source.
>
> The kernel uses the value of specific policy capabilities to decide
> whether to enable corresponding checks/logic in security/selinux/hooks.c
> in the kernel source; look for tests of selinux_policycap_*.
> These variables are set upon policy load by security_load_policycaps(),
> loaded from a bitmap read from the policy file.
Ok, thanks for clarifying.
But just curious -- these new checks may not be not be backwards
compatible? I mean if the kernel has enabled a policy feature, but the
loaded policy does not have any such capability, then can it cause any
problems?
Also the policy has a version, using that it's capabilities can be known
to the kernel and it may enable disable the features based on that. So
in this case, why is policy capability required?
next prev parent reply other threads:[~2014-07-22 5:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-19 8:03 What's a policy capability? dE
2014-07-21 12:51 ` Stephen Smalley
2014-07-22 5:03 ` dE [this message]
2014-07-22 12:27 ` Christopher J. PeBenito
2014-07-23 6:42 ` dE
2014-07-22 12:45 ` Stephen Smalley
2014-07-23 6:06 ` dE
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=53CDF09D.4050304@gmail.com \
--to=de.techno@gmail.com \
--cc=selinux@tycho.nsa.gov \
/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.