All of lore.kernel.org
 help / color / mirror / Atom feed
From: sds@tycho.nsa.gov (Stephen Smalley)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [ access_vectors patch 1/2] Add access vectors: audit_access, read_policy.
Date: Wed, 16 Feb 2011 12:43:21 -0500	[thread overview]
Message-ID: <1297878201.27031.44.camel@moss-pluto> (raw)
In-Reply-To: <20110214204329.GA9388@localhost.localdomain>

On Mon, 2011-02-14 at 21:43 +0100, Dominick Grift wrote:
> I guess read_policy is a permissive required together with read_file_perms for /selinux/policy. What audit_access actually does i do not know. Also i re-ordered execmod and open because currently it was not complete.
> 
> Signed-off-by: Dominick Grift <domg472@gmail.com>
> ---
> :100644 100644 0ef9b12... 1966443... M	policy/flask/access_vectors
>  policy/flask/access_vectors |   18 ++++--------------
>  1 files changed, 4 insertions(+), 14 deletions(-)
> 
> diff --git a/policy/flask/access_vectors b/policy/flask/access_vectors
> index 0ef9b12..1966443 100644
> --- a/policy/flask/access_vectors
> +++ b/policy/flask/access_vectors
> @@ -27,6 +27,9 @@ common file
>  	swapon
>  	quotaon
>  	mounton
> +	audit_access
> +	open
> +	execmod
>  }

You can't insert permissions into the common definition without
perturbing the permission values for subsequent permissions in the
per-class definitions.  That isn't a problem for recent kernels with
dynamic class/permission mapping support, but it will break
compatibility for older kernels.  What you can do instead is to add new
permissions, like audit_access, to the end of each per-file class, and
then kernels with the dynamic class/perm mapping support will
transparently map the values.

>  
> 
> @@ -152,7 +155,6 @@ inherits file
>  	reparent
>  	search
>  	rmdir
> -	open
>  }

Likewise you can't move or remove permissions from kernel classes
without breaking old kernels.

>  
>  class file
> @@ -160,8 +162,6 @@ inherits file
>  {
>  	execute_no_trans
>  	entrypoint
> -	execmod
> -	open
>  }
>  
>  class lnk_file
> @@ -172,27 +172,16 @@ inherits file
>  {
>  	execute_no_trans
>  	entrypoint
> -	execmod
> -	open
>  }
>  
>  class blk_file
>  inherits file
> -{
> -	open
> -}
>  
>  class sock_file
>  inherits file
> -{
> -	open
> -}
>  
>  class fifo_file
>  inherits file
> -{
> -	open
> -}
>  
>  class fd
>  {
> @@ -363,6 +352,7 @@ class security
>  	setbool
>  	setsecparam
>  	setcheckreqprot
> +	read_policy
>  }
>  
> 
> _______________________________________________
> refpolicy mailing list
> refpolicy at oss.tresys.com
> http://oss.tresys.com/mailman/listinfo/refpolicy

-- 
Stephen Smalley
National Security Agency

  reply	other threads:[~2011-02-16 17:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14 20:43 [refpolicy] [ access_vectors patch 1/2] Add access vectors: audit_access, read_policy Dominick Grift
2011-02-16 17:43 ` Stephen Smalley [this message]
2011-02-16 17:49   ` Dominick Grift
2011-02-16 17:50     ` Eric Paris

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=1297878201.27031.44.camel@moss-pluto \
    --to=sds@tycho.nsa.gov \
    --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.