All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christopher J. PeBenito" <cpebenito@tresys.com>
To: Ryan Bradetich <rbradetich@gmail.com>
Cc: selinux@tycho.nsa.gov
Subject: Re: Problems with login from serial port.
Date: Mon, 12 Mar 2007 01:43:35 +0000	[thread overview]
Message-ID: <1173663815.29664.31.camel@sgc> (raw)
In-Reply-To: <e739902b0703102125r205f725bs89242fdf00480662@mail.gmail.com>

On Sat, 2007-03-10 at 21:25 -0800, Ryan Bradetich wrote:
> I have been making good progress on my customized policy, but I ran
> into a problem that I do not understand.
[cut]
> Here are the avc message I get when I login in permissive mode:
> 
> audit(1173587017.702:3): avc:  denied  { relabelfrom } for  pid=199
> comm="login" name="ttyS0" dev=hda1 ino=31387
> scontext=system_u:system_r:system_t
> tcontext=root:object_r:sysadm_tty_device_t tclass=chr_file
> 
> audit(1173587017.702:3): avc:  denied  { relabelto } for  pid=199
> comm="login" name="ttyS0" dev=hda1 ino=31387
> scontext=system_u:system_r:system_t
> tcontext=root:object_r:sysadm_tty_device_t tclass=chr_file
[cut]
> I have the following rule in my policy file (I thought this rule will
> have addressed the avc  message):
> 
> allow system_t sysadm_tty_device_t:chr_file { read write ioctl getattr
> setattr relabelto relabelfrom };

Notice that the scontext is "system_u::" and the tcontext is "root::".
You are hitting the constraint which requires that the SELinux user of
the domain doing the relabeling to match the SELinux user of the object:

constrain dir_file_class_set { create relabelto relabelfrom } 
(
	u1 == u2

	or t1 == can_change_object_identity
);

So you want domain_obj_id_change_exemption(system_t) to pass this
constraint.

-- 
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-03-12  1:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-11  5:25 Problems with login from serial port Ryan Bradetich
2007-03-12  1:43 ` Christopher J. PeBenito [this message]
2007-03-12  4:53   ` Eric Paris
2007-03-12 12:45     ` Stephen Smalley

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=1173663815.29664.31.camel@sgc \
    --to=cpebenito@tresys.com \
    --cc=rbradetich@gmail.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.