All of lore.kernel.org
 help / color / mirror / Atom feed
From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] Why console not usable by default?
Date: Tue, 26 Oct 2010 08:03:48 -0400	[thread overview]
Message-ID: <4CC6C3A4.2080905@tresys.com> (raw)
In-Reply-To: <SNT139-w7E36775349BB2932E65D1AB420@phx.gbl>

On 10/26/10 05:58, TaurusHarry wrote:
> Hi refpolicy experts,
> 
> I am trying to play with the refpolicy from the latest git tree in a
> qemu environment, which I could login from serial console or by ssh. I
> run into a serial of problem when logging in from the serial console nor
> running userspace applications on top of it. The attached is the patch I
> made up so far to make the serial console "usable" by normal operations.
> 
> I couldn't help wondering why the console is not made available for many
> userspace domains in the refpolicy by default? Take the getty_t for
> instance, in getty.te, not only the getty_t not permitted to use
> console, but further more, a dontaudit rule is used to suppress the
> related AVC Denied messages:
> 
> -term_dontaudit_use_console(getty_t)
> +term_use_console(getty_t)
> 
> I guess I would have to make above changes in order to login from the
> console, otherwise the mingetty will fail with following error messages:
>         INIT: Id "0" respawnin g too fast: disabled for 5 minutes
>         INIT: no more processes left in this runlevel
> 
> Furthermore, if we remove the "term_dontaudit_use_console(getty_t)"
> rule, we can see that /sbin/mingetty fails to execute /bin/login:
>         type=1400 audit(1264520547.936:68): avc:  denied  { noatsecure }
> for  pid=2292 comm="login"
> scontext=system_u:system_r:getty_t:s0-s15:c0.c255
> tcontext=system_u:system_r:local_login_t:s0-s15:c0.c255 tclass=process
> 
> 
> Could some one enlighten me on the decision made about the console in
> the refpolicy implementation? and why?

It is this way because getty doesn't normally run on /dev/console.  It
normally runs on /dev/tty*.


-- 
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com

  parent reply	other threads:[~2010-10-26 12:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-26  9:58 [refpolicy] Why console not usable by default? TaurusHarry
2010-10-26 11:23 ` Dominick Grift
2010-10-26 12:03 ` Christopher J. PeBenito [this message]
2010-10-26 12:27   ` Daniel J Walsh
2010-10-27  9:11     ` TaurusHarry
2010-10-27 12:22     ` Christopher J. PeBenito

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=4CC6C3A4.2080905@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.