From: Harald Hoyer <harald@redhat.com>
To: Eric Paris <eparis@redhat.com>
Cc: Daniel J Walsh <dwalsh@redhat.com>,
Kay Sievers <kay.sievers@vrfy.org>,
linux-kernel@vger.kernel.org, selinux@tycho.nsa.gov,
greg@kroah.com, sds@tycho.nsa.gov
Subject: Re: selinux vs devtmpfs (vs udev)
Date: Tue, 31 Aug 2010 17:49:30 +0200 [thread overview]
Message-ID: <4C7D248A.2080507@redhat.com> (raw)
In-Reply-To: <1283268367.3284.154.camel@dhcp231-106.rdu.redhat.com>
On 08/31/2010 05:26 PM, Eric Paris wrote:
> On Tue, 2010-08-31 at 11:22 -0400, Daniel J Walsh wrote:
>> On 08/31/2010 11:16 AM, Eric Paris wrote:
>
>>> I suggest a third options: Calculate the default at startup and on every
>>> policy load and fix object labels if they are the default. I'm sure Dan
>>> knows a code example of how to do the calculation. The pseudocode looks
>>> something like:
>>
>>
>>>
>>> lookup the label on /dev
>>> lookup the label on the initial task
>>> ask the kernel what the resulting label on a file transition with those
>>> two pieces of information will be.
>>
>>
>> NOOOOO
>>
>> libvirt is going in and changing fixed_disk_device_t:s0 to svirt_t:c0,c124
>>
>> We do not want udev to see this and ask what label a device should have
>> if libvirtd_t created a chr_file in device_t.
>
> initial task == /sbin/init
>
> actually I should look if the kernel init_cred (what devtmpfs uses to
> make security decisions) is initrc_t or kernel_t. I'm guessing it is
> kernel_t but I'm not certain how that gets set.....
>
> -Eric
>
https://bugzilla.redhat.com/show_bug.cgi?id=575128#c14
https://bugzilla.redhat.com/attachment.cgi?id=442223&format=raw
udev/udev-node.c
+ /* set selinux file context on add events */
+ if (strcmp(udev_device_get_action(dev), "add") == 0)
+ udev_selinux_lsetfilecon(udev, file, mode);
next prev parent reply other threads:[~2010-08-31 15:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-27 23:00 selinux vs devtmpfs (vs udev) Eric Paris
2010-08-28 9:57 ` Kay Sievers
2010-08-30 23:14 ` Eric Paris
2010-08-31 8:44 ` Harald Hoyer
2010-08-31 14:11 ` Daniel J Walsh
2010-08-31 14:39 ` Harald Hoyer
2010-08-31 14:56 ` Daniel J Walsh
2010-08-31 14:57 ` Daniel J Walsh
2010-08-31 15:16 ` Eric Paris
2010-08-31 15:22 ` Daniel J Walsh
2010-08-31 15:26 ` Eric Paris
2010-08-31 15:49 ` Harald Hoyer [this message]
2010-08-31 19:32 ` Kay Sievers
2010-08-31 19:37 ` Daniel J Walsh
2010-08-31 20:51 ` Eric Paris
2010-09-01 16:08 ` Stephen Smalley
2010-09-01 17:59 ` Kay Sievers
2010-09-01 19:44 ` Daniel J Walsh
2010-08-31 21:55 ` Harald Hoyer
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=4C7D248A.2080507@redhat.com \
--to=harald@redhat.com \
--cc=dwalsh@redhat.com \
--cc=eparis@redhat.com \
--cc=greg@kroah.com \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox