All of lore.kernel.org
 help / color / mirror / Atom feed
From: guido@trentalancia.com (Guido Trentalancia)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] Help with policy definition.
Date: Tue, 07 Jun 2011 05:52:58 +0200	[thread overview]
Message-ID: <1307418782.22605.174.camel@vortex> (raw)
In-Reply-To: <BANLkTi=2=mMMTE9raGH+HM8sa7SK3VX=fA@mail.gmail.com>

Hi Sam !

On Mon, 2011-06-06 at 16:26 -0700, Sam Gandhi wrote:
> I am writing a policy for embedded device that I am working with. When
> I am in permissive mode I can login to my console located on
> /dev/ttymxc1.
> 
> which generate AVC message
> 
> user.notice kernel: type=1400 audit(165.890:8): avc:  denied  {
> relabelto } for  pid=605 comm="login" name="ttymxc1" dev=tmpfs
> ino=1475 scontext=system_u:system_r:kernel_t
> tcontext=user_u:object_r:tty_device_t tclass=chr_file
> 
> which audit2allow says should translate to :
> 
>      allow kernel_t tty_device_t:chr_file relabelto;
> 
> Even if with above allow rule when in enforcing mode I am not able to
> login to my serial console and I get message on the console.

Have you tried to check for rules that are "dontaudit"'ed (semodule -DB
and then revert back using semodule -B once finished analysing) ?

> login: chsid(/dev/ttymxc1, user_u:object_r:tty_device_t) failed:

Can you do some sort of tracing of the system calls and signals close to
the failure point ?

There is something missing after "failed:" (the reason for failure) that
a human can hardly figure out...

And you are not using login from util-linux-ng, are you ?

And the policy, you didn't say much, is it plain refpolicy from git or
release ?

> /dev/ttymxc1 in my case has label of  user_u:object_r:tty_device_t
> 
> What am I missing in my configuration or any hints on how I should go
> about debugging this issue/

> /Sam

Guido

  reply	other threads:[~2011-06-07  3:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-06 23:26 [refpolicy] Help with policy definition Sam Gandhi
2011-06-07  3:52 ` Guido Trentalancia [this message]
2011-06-07 15:30   ` Sam Gandhi
2011-06-07 19:42     ` Guido Trentalancia
2011-06-07 12:03 ` Christopher J. PeBenito
2011-06-07 19:11   ` Guido Trentalancia
2011-06-07 19:28     ` 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=1307418782.22605.174.camel@vortex \
    --to=guido@trentalancia.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.