All of lore.kernel.org
 help / color / mirror / Atom feed
From: pebenito@ieee.org (Chris PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH v2 1/5] wm: update the window manager (wm) module and enable its role template (v5)
Date: Wed, 14 Dec 2016 17:07:27 -0500	[thread overview]
Message-ID: <be3d7069-66f2-f8eb-20e6-4e8dcc908856@ieee.org> (raw)
In-Reply-To: <de57baa3-0dfc-1d41-ea1b-5a7d55607c2e@gmail.com>

On 12/14/16 16:52, Dominick Grift via refpolicy wrote:
> On 12/14/2016 10:45 PM, Dominick Grift wrote:
>> On 12/14/2016 10:34 PM, Dominick Grift wrote:
>>> On 12/14/2016 10:23 PM, Chris PeBenito via refpolicy wrote:
>>>> On 12/14/16 10:33, Guido Trentalancia via refpolicy wrote:

[...]

>>>>> and then, for each application that you want to enable from the window
>>>>> manager, you need to call the interface wm_application_domain() from
>>>>> the application module similarly to the way the
>>>>> userdom_user_application_domain() interface is currently called.
>>>>>
>>>>> For example, for mozilla:
>>>>>
>>>>> [cut]
>>>>>
>>>>> --- refpolicy-git-orig/policy/modules/contrib/mozilla.te	2016-12-09 22:29:53.579462880 +0100
>>>>> +++ refpolicy-git/policy/modules/contrib/mozilla.te	2016-12-14 16:28:46.055294184 +0100
>>>>> @@ -22,6 +39,7 @@ type mozilla_exec_t;
>>>>>  typealias mozilla_t alias { user_mozilla_t staff_mozilla_t sysadm_mozilla_t };
>>>>>  typealias mozilla_t alias { auditadm_mozilla_t secadm_mozilla_t };
>>>>>  userdom_user_application_domain(mozilla_t, mozilla_exec_t)
>>>>> +wm_application_domain(mozilla_t, mozilla_exec_t)
>>>>
>>>> I'd tend to prefer it this way, as long as you make this call optional.
>>>
>>> In the bigger picture this solution is a bit unwieldy in my view. There
>>> are various components that need to be able to run programs on behalf of
>>> the user. In this case it is gnome shell, but for example systemd --user
>>> needs the same, and there are various other instances.
>>>
>>> The solution i have in dssp is not perfect either. But for domain
>>> transitions that apply to more than the just shell i
>>> use a type attribute.
>>>
>>> example: mozilla_run(staff_type_attribute, role_attribute)
>>>
>>> Then i associate the type attribute also with the programs that need to
>>> be able to run the programs on behalf of the user.
>>>
>>> staff_type(staff_wm_t)
>>> staff_type(staff_systemd_t)
>>>
>>> It is not perfect either but atleast it provides a single point of
>>> failure. domain transitions apply automatically to all domains that need
>>> to be able to run programs on behalf of the user

The Fedora policy has had this concept for a long time and I never liked 
it.  It makes it much less obvious what a domain can do by looking at 
the policy sources.  It's easy to overlook the staff_type() call you 
have above, and even if you see it, it may be hard to understand what 
that truly implies.

I still feel that is the case, but it may be time to do it anyway.  If 
so, it would have to be only in a limited way, for example only for 
domain transitions.


-- 
Chris PeBenito

  parent reply	other threads:[~2016-12-14 22:07 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-07 17:00 [refpolicy] [PATCH] wm: update the window manager (wm) module and enable its role template Guido Trentalancia
2016-12-08 17:20 ` [refpolicy] [PATCH v2] " Guido Trentalancia
2016-12-08 17:51   ` Dominick Grift
2016-12-08 20:53     ` Guido Trentalancia
2016-12-08 21:13       ` Dominick Grift
2016-12-08 21:51         ` Guido Trentalancia
2016-12-09 22:21   ` [refpolicy] [PATCH v3] " Guido Trentalancia
2016-12-11 20:04     ` Chris PeBenito
2016-12-11 20:13       ` Guido Trentalancia
2016-12-11 20:47         ` Chris PeBenito
2016-12-11 21:56           ` Guido Trentalancia
2016-12-12  2:35             ` Luis Ressel
2016-12-14  0:48     ` [refpolicy] [PATCH 1/5] wm: update the window manager (wm) module and enable its role template (v4) Guido Trentalancia
2016-12-14  1:54       ` [refpolicy] [PATCH v2 1/5] wm: update the window manager (wm) module and enable its role template (v5) Guido Trentalancia
     [not found]         ` <CAPuKSJbhx+9kkU_KK5qX8s6ALknojqTeqmtjrkJR0fkVBn=wWg@mail.gmail.com>
2016-12-14 13:23           ` Guido Trentalancia
2016-12-14 21:25             ` Chris PeBenito
2016-12-14 21:29               ` Guido Trentalancia
2016-12-14 23:43               ` [refpolicy] [PATCH v3 1/5] wm: update the window manager (wm) module and enable its role template (v6) Guido Trentalancia
2016-12-16  0:31                 ` Chris PeBenito
2016-12-16 15:59                   ` [refpolicy] [PATCH v4 1/5 base part] wm: update the window manager (wm) module and enable its role template (v7) Guido Trentalancia
2016-12-17 14:05                     ` Chris PeBenito
2016-12-17 16:56                       ` Guido Trentalancia
2016-12-17 18:06                         ` Chris PeBenito
2016-12-16 15:59                   ` [refpolicy] [PATCH v4 1/5 contrib " Guido Trentalancia
2016-12-14 14:37           ` [refpolicy] [PATCH v2 1/5] wm: update the window manager (wm) module and enable its role template (v5) Guido Trentalancia
2016-12-14 15:33             ` Guido Trentalancia
2016-12-14 21:23               ` Chris PeBenito
2016-12-14 21:34                 ` Dominick Grift
2016-12-14 21:45                   ` Dominick Grift
2016-12-14 21:52                     ` Dominick Grift
2016-12-14 22:01                       ` Dominick Grift
2016-12-14 22:07                       ` Chris PeBenito [this message]
2016-12-14 22:13                         ` Dominick Grift
2016-12-14 22:14                         ` Guido Trentalancia
2016-12-14 22:20                           ` Dominick Grift
2016-12-14  0:48     ` [refpolicy] [PATCH 2/5] userdomain: separate optional conditionals for gnome and wm role templates Guido Trentalancia
2016-12-14  0:48     ` [refpolicy] [PATCH 3/5] networkmanager: enable dbus chat with xdm Guido Trentalancia
2016-12-14 12:44       ` Jason Zaman
2016-12-14 12:48         ` Dominick Grift
2016-12-14  0:49     ` [refpolicy] [PATCH 4/5] policykit: " Guido Trentalancia
2016-12-14  0:49     ` [refpolicy] [PATCH 5/5] rtkit: " Guido Trentalancia
2016-12-14 21:29       ` Chris PeBenito
2016-12-14 23:09         ` [refpolicy] [PATCH v2 " Guido Trentalancia
2016-12-17 16:43           ` Guido Trentalancia
2016-12-17 17:55             ` Chris PeBenito
2016-12-17 18:06               ` [refpolicy] [PATCH v3 " Guido Trentalancia
2016-12-18 22:57                 ` Chris 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=be3d7069-66f2-f8eb-20e6-4e8dcc908856@ieee.org \
    --to=pebenito@ieee.org \
    --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.