All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Brindle <method@manicmethod.com>
To: Joe Nall <joe@nall.com>
Cc: "Christopher J. PeBenito" <cpebenito@tresys.com>,
	SE Linux <selinux@tycho.nsa.gov>
Subject: Re: Use of optional_policy in templates (compiler bug or feature?)
Date: Thu, 16 Oct 2008 10:50:29 -0400	[thread overview]
Message-ID: <48F754B5.8020302@manicmethod.com> (raw)
In-Reply-To: <B644A871-625C-477E-A9EA-6FF003227C8B@nall.com>

Joe Nall wrote:
>
> On Oct 16, 2008, at 7:49 AM, Christopher J. PeBenito wrote:
>
>> On Wed, 2008-10-15 at 14:59 -0500, Joe Nall wrote:
>>> On Oct 15, 2008, at 1:46 PM, Christopher J. PeBenito wrote:
>>>
>>>> On Wed, 2008-10-15 at 11:02 -0500, Joe Nall wrote:
>>>>> Is it legitimate to define a type within an optional_policy within a
>>>>> template?
>>>>
>>>> Yes.
>>>>
>>>>> I ask because there are a number of compile issues with policy that
>>>>> look like:
>>>>>
>>>>> template(`wm_domain_template',`
>>>>> ...
>>>>>        optional_policy(`
>>>>>                dbus_system_bus_client_template($1_wm,$1_wm_t)
>>>>> # does not compile
>>>>> #               dbus_user_bus_client_template($1,$1_wm,$1_wm_t)
>>>>>        ')
>>>>> ...
>>>>> ')
>>>>
>>>> I can't reproduce this by just adding it to a random module; there are
>>>> likely more factors that just the above template calls.
>>>
>>> Using stock Fedora targeted policy:
>>>
>>> policy_module(swo,1.0.0)
>>>
>>> userdom_unpriv_user_template(swo)
>>> dbus_chat_user_bus(swo,swo_t)
>>
>> Well this is a weird case, because you have this situation:
>>
>> optional {
>>     # optionally declare the type
>>     # from userdom_unpriv_user_template(swo)
>>     type swo_dbusd_t;
>> }
>>
>> # unconditionally require the type for this module
>> # from dbus_chat_user_bus(swo,swo_t)
>> require {
>>     type swo_dbusd_t;
>> }
>>
>>
>> but even if you make the second interface call optional too, you'll
>> still get the compile error.
>
> Weird wrong or weird corner case that ought to work?
>

Weird unsupported. It was thought non-trivial to deterministically 
enable optionals in cases like this.


--
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:[~2008-10-16 14:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-15 16:02 Use of optional_policy in templates (compiler bug or feature?) Joe Nall
2008-10-15 18:46 ` Christopher J. PeBenito
2008-10-15 19:59   ` Joe Nall
2008-10-16 12:49     ` Christopher J. PeBenito
2008-10-16 13:43       ` Joe Nall
2008-10-16 14:50         ` Joshua Brindle [this message]
2008-10-16 15:46           ` Joe Nall
2008-10-20 18:19           ` Daniel J Walsh
2008-10-20 18:41             ` Joe Nall
2008-10-20 23:52               ` Eamon Walsh
2008-10-22 14:01                 ` Stephen Smalley
2008-10-22 14:26                   ` Joe Nall
2008-10-22 14:28                     ` Stephen Smalley
2008-10-22 14:32                       ` Stephen Smalley
2008-10-22 17:42                         ` Joshua Brindle
2008-10-23 14:10                           ` Stephen Smalley
2008-10-23 14:15                             ` Joshua Brindle
2008-10-23 14:16                             ` Stephen Smalley
2008-11-24  3:35                         ` Joe Nall
2008-12-02 14:26                           ` Joe Nall
2008-12-02 14:27                             ` 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=48F754B5.8020302@manicmethod.com \
    --to=method@manicmethod.com \
    --cc=cpebenito@tresys.com \
    --cc=joe@nall.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.