All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christopher J. PeBenito" <cpebenito@tresys.com>
To: Daniel J Walsh <dwalsh@redhat.com>
Cc: SE Linux <selinux@tycho.nsa.gov>
Subject: Re: selinux_getattr patch
Date: Wed, 11 Apr 2007 19:45:16 +0000	[thread overview]
Message-ID: <1176320717.9840.55.camel@sgc> (raw)
In-Reply-To: <460426EA.6050801@redhat.com>

On Fri, 2007-03-23 at 15:13 -0400, Daniel J Walsh wrote:
> Some apps doing a getattr of all files in / generate avc messages on
> /selinux
> 
> This patch removes those avc's.

This looks more like something to do with the libselinux constructor.
Perhaps we should have interfaces for selinux aware programs, for
allowing and dontauditing the constructor, at least.

> 
> 
> 
> 
> 
> differences
> between files
> attachment
> (selinux_getattr.patch), "selinux_getattr.patch"
> 
> --- nsaserefpolicy/policy/modules/kernel/selinux.if     2007-02-27 14:37:10.000000000 -0500
> +++ serefpolicy-2.5.10/policy/modules/kernel/selinux.if 2007-03-22 15:06:58.000000000 -0400
> @@ -51,6 +51,44 @@
>  
>  ########################################
>  ## <summary>
> +##     Do not audit attempts to get the
> +##     attributes of the selinuxfs filesystem
> +## </summary>
> +## <param name="domain">
> +##     <summary>
> +##     Domain to not audit.
> +##     </summary>
> +## </param>
> +#
> +interface(`selinux_dontaudit_getattr_fs',`
> +       gen_require(`
> +               type security_t;
> +       ')
> +
> +       dontaudit $1 security_t:filesystem getattr;
> +')
> +
> +########################################
> +## <summary>
> +##     Allow domain to get the
> +##     attributes of the selinuxfs filesystem
> +## </summary>
> +## <param name="domain">
> +##     <summary>
> +##     Domain to not audit.
> +##     </summary>
> +## </param>
> +#
> +interface(`selinux_getattr_fs',`
> +       gen_require(`
> +               type security_t;
> +       ')
> +
> +       allow $1 security_t:filesystem getattr;
> +')
> +
> +########################################
> +## <summary>
>  ##     Search selinuxfs.
>  ## </summary>
>  ## <param name="domain">
> --- nsaserefpolicy/policy/modules/system/selinuxutil.if 2007-01-02 12:57:49.000000000 -0500
> +++ serefpolicy-2.5.10/policy/modules/system/selinuxutil.if     2007-03-22 15:06:59.000000000 -0400
> @@ -616,7 +616,7 @@
>         gen_require(`
>                 type selinux_config_t;
>         ')
> -
> +       selinux_dontaudit_getattr_fs($1)
>         dontaudit $1 selinux_config_t:dir search;
>         dontaudit $1 selinux_config_t:file { getattr read };
>  ')
> @@ -637,6 +637,8 @@
>                 type selinux_config_t;
>         ')
>  
> +       selinux_getattr_fs($1)
> +
>         files_search_etc($1)
>         allow $1 selinux_config_t:dir list_dir_perms;
>         read_files_pattern($1,selinux_config_t,selinux_config_t)
> 
-- 
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  reply	other threads:[~2007-04-11 19:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-23 19:13 selinux_getattr patch Daniel J Walsh
2007-04-11 19:45 ` Christopher J. PeBenito [this message]
2007-04-11 20:20   ` Daniel J Walsh

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=1176320717.9840.55.camel@sgc \
    --to=cpebenito@tresys.com \
    --cc=dwalsh@redhat.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.