All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christopher J. PeBenito" <cpebenito@tresys.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Paul Moore <paul.moore@hp.com>, SE Linux <selinux@tycho.nsa.gov>,
	Daniel J Walsh <dwalsh@redhat.com>
Subject: Re: Running racoon from init_t?
Date: Fri, 09 Mar 2007 21:30:09 +0000	[thread overview]
Message-ID: <1173475809.29664.14.camel@sgc> (raw)
In-Reply-To: <1173462020.3241.131.camel@moss-spartans.epoch.ncsc.mil>

On Fri, 2007-03-09 at 12:40 -0500, Stephen Smalley wrote:
> On Fri, 2007-03-09 at 12:36 -0500, Stephen Smalley wrote:
> > On Fri, 2007-03-09 at 12:09 -0500, Paul Moore wrote:
> > > This is in regards to RHEL5 and the MLS policy.
> > > 
> > > I'm trying to run racoon at startup, from within the rc.local script, which 
> > > means it is being run from init/init_t.  Whenever I try to do this I see the 
> > > following AVC denials:
> > 
> > Should be run from initrc_t (rc.local should have initrc_exec_t on it).
> > Although the inherited fds may still have init_t on them due to being
> > created by /sbin/init and then just inherited by the descendants.
> > 
> > > 
> > > ***
> > > type=AVC msg=audit(1173457995.784:305): avc:  denied  { use } for  pid=2105 
> > > comm="racoon" name="console" dev=tmpfs ino=725 
> > > scontext=system_u:system_r:racoon_t:s0-s15:c0.c1023 
> > > tcontext=system_u:system_r:init_t:s0-s15:c0.c1023 tclass=fd
> > > type=AVC msg=audit(1173457995.784:305): avc:  denied  { use } for  pid=2105 
> > > comm="racoon" name="console" dev=tmpfs ino=725 
> > > scontext=system_u:system_r:racoon_t:s0-s15:c0.c1023 
> > > tcontext=system_u:system_r:init_t:s0-s15:c0.c1023 tclass=fd
> > > type=AVC msg=audit(1173457995.784:305): avc:  denied  { use } for  pid=2105 
> > > comm="racoon" name="console" dev=tmpfs ino=725 
> > > scontext=system_u:system_r:racoon_t:s0-s15:c0.c1023 
> > > tcontext=system_u:system_r:init_t:s0-s15:c0.c1023 tclass=fd
> > > ***
> > > 
> > > I suspect this can fixed by adding the following to the policy, suggestions?
> > > 
> > >  init_use_fds(racoon_t)
> > 
> > I'd have expected it to pick up the right rules from being an
> > init_daemon_domain().
> 
> Actually, I'd tend to think that should be dontaudit'd - it doesn't have
> a legitimate need to access the console, right?  Then SELinux will just
> close the descriptor silently and replace it with a ref to the null
> device.

I agree.  Actually there's a noticeable amount of services that allow
this already.  If the service has rules that allow the console access,
we can leave the init fd inheritance for now (making note to revisit
it).  But if it doesn't use the console, we can remove the
init_use_fds() and have the fds be dontaudited through the
init_daemon_domain() interface.  Make sense?

-- 
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.

      parent reply	other threads:[~2007-03-09 21:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-09 17:09 Running racoon from init_t? Paul Moore
2007-03-09 17:36 ` Stephen Smalley
2007-03-09 17:40   ` Stephen Smalley
2007-03-09 19:31     ` Paul Moore
2007-03-09 21:30     ` 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=1173475809.29664.14.camel@sgc \
    --to=cpebenito@tresys.com \
    --cc=dwalsh@redhat.com \
    --cc=paul.moore@hp.com \
    --cc=sds@tycho.nsa.gov \
    --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.