From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH 17/34]: patch to allow plymouthd use unallocated ttys
Date: Mon, 07 Mar 2011 09:06:26 -0500 [thread overview]
Message-ID: <4D74E662.4030800@tresys.com> (raw)
In-Reply-To: <1299013310.14035.47.camel@tesla.lan>
On 03/01/11 16:01, Guido Trentalancia wrote:
> On Tue, 01/03/2011 at 14.24 -0500, Christopher J. PeBenito wrote:
>> On 02/23/11 13:34, Guido Trentalancia wrote:
>>> Hello Christopher !
>>>
>>> On Wed, 23/02/2011 at 09.48 -0500, Christopher J. PeBenito wrote:
>>>> On 02/16/11 01:18, Guido Trentalancia wrote:
>>>>> This patch allows plymouthd to use unallocated ttys.
>>>>>
>>>>> diff -pruN -x booleans.conf -x corenetwork.if -x corenetwork.te -x modules.conf refpolicy-git-02022011/policy/modules/services/plymouthd.te refpolicy-git-02022011-new/policy/modules/services/plymouthd.te
>>>>> --- refpolicy-git-02022011/policy/modules/services/plymouthd.te 2011-01-08 19:07:21.280747356 +0100
>>>>> +++ refpolicy-git-02022011-new/policy/modules/services/plymouthd.te 2011-01-26 01:40:06.542176190 +0100
>>>>> @@ -64,6 +64,8 @@ miscfiles_read_localization(plymouthd_t)
>>>>> miscfiles_read_fonts(plymouthd_t)
>>>>> miscfiles_manage_fonts_cache(plymouthd_t)
>>>>>
>>>>> +term_use_unallocated_ttys(plymouthd_t)
>>>>> +
>>>>> ########################################
>>>>> #
>>>>> # Plymouth private policy
>>>>
>>>> Why? Would it be possible to specifically label the devices?
>>>
>>> I think they are unallocated not unlabelled.
>>>
>>> They have label tty_device_t and what is needed is chr_file { write
>>> ioctl read open getattr append }.
>>>
>>> Possibly it's stuff such as /dev/tty63, /dev/hvc0 and so on.
>>
>> The point is that we want to isolate the access if possible. If it only
>> works on /dev/tty63, then we can consider giving that a different label.
>
> It is defined at compile time. Basically there are two devices:
>
> BOOT_TTY "/dev/tty1"
> SHUTDOWN_TTY "/dev/tty63"
>
> but the above are just the default values and they can be changed using
> configure options.
>
> Of course isolating an access is always good, but consider the above and
> consider that this package is only used by Fedora... More or less it's a
> just toy.
>
> I am not sure that relabeling generic devices such as tty1 and tty63 is
> a good idea.
Since the default is tty1, I'd have to agree. Though I think its
unfortunate.
>>> By the way, recently I had to add these (to use ftp as root from a
>>> console):
>>>
>>> kernel_request_load_module(sysadm_t) in policy/modules/roles/sysadm.te
>>> (trying to load ipv6 module)
>>
>> Not a problem to add this, since sysadm can actively insert modules.
>>
>>> corenet_tcp_bind_generic_node(sysadm_t) in
>>> policy/modules/roles/sysadm.te (ftp list directory)
>>
>> My guess is this has to do with active mode FTP.
>>
>>> And there might be more, I am still testing...
>>>
>>> What am I getting wrong here ? Apparently the console is having some
>>> issues (and perhaps not just with ftp) that are not showing up from an X
>>> terminal... So either I am doing something wrong or what's the reason
>>> for having a console much more restricted than X terminals ??
>>
>> They shouldn't be. Perhaps the ipv6 module is loaded by the time you
>> get X started. As for the FTP, are you doing it as sysadm_t in X too?
>
> Yes, it is probably related to the active mode. But it should be allowed
> as sysadm_t. We need to check the console functionality carefully as
> soon as all the other pending patches have been sorted out.
>
> The ipv6 module is disabled. Of course this does not prevent new
> requests from being made (applications do not know it's disabled)...
>
> As for the ftp client, I am doing it from xdm_t under X (from a
> "graphical" terminal). It's just one of many other things that are not
> fully functional under the console. We'll get into all that pain soon...
If you're running as a user as xdm_t, it is the wrong domain. If that
is why there is a bunch of added xdm_t dbus access in your patches,
those rules shouldn't be added.
--
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com
next prev parent reply other threads:[~2011-03-07 14:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-16 6:18 [refpolicy] [PATCH 17/34]: patch to allow plymouthd use unallocated ttys Guido Trentalancia
2011-02-23 14:48 ` Christopher J. PeBenito
2011-02-23 18:34 ` Guido Trentalancia
2011-03-01 19:24 ` Christopher J. PeBenito
2011-03-01 21:01 ` Guido Trentalancia
2011-03-07 14:06 ` Christopher J. PeBenito [this message]
2011-03-07 17:18 ` Guido Trentalancia
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=4D74E662.4030800@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.