From: Eamon Walsh <ewalsh@tycho.nsa.gov>
To: "Christopher J. PeBenito" <cpebenito@tresys.com>
Cc: Daniel J Walsh <dwalsh@redhat.com>,
Stephen Smalley <sds@tycho.nsa.gov>,
SE Linux <selinux@tycho.nsa.gov>,
Joshua Brindle <jbrindle@tresys.com>
Subject: Re: Trying to get XAce policy straightened out but our tool chain is too broken to handle it.
Date: Wed, 25 Jun 2008 14:28:53 -0400 [thread overview]
Message-ID: <48628E65.8030701@tycho.nsa.gov> (raw)
In-Reply-To: <1214227346.11146.237.camel@gorn>
Christopher J. PeBenito wrote:
> On Mon, 2008-06-23 at 07:17 -0400, Daniel J Walsh wrote:
>
>> Stephen Smalley wrote:
>>
>>> On Thu, 2008-06-05 at 11:11 -0400, Daniel J Walsh wrote:
>>>
>
>
>>>> The problem I have is the compiler is too stupid to understand the
>>>> differences between a gen_requires block defining the required types and
>>>> the actual type definition.
>>>>
>>>> So I end up in a catch 22 where the compiler tells me I need to require
>>>> $1_rootwindow_t, but if I gen_require type $1_rootwindow_t, it tells me
>>>> I have a duplicate definition.
>>>>
>>>> So if you have a derived type in a gen_requires block the compiler can
>>>> not handle it.
>>>>
>>> I'm a little unclear as to why this is required (why do you need to
>>> require and declare the same symbol again?). However, is there some
>>> reason we can't just automatically promote a require to a declaration
>>> upon encountering the latter? Seems like we've talked about this
>>> before. Not sure whether that should happen within libsepol
>>> symtab_insert() or in the callers, e.g. declare_type().
>>>
>>>
>> I don't know, All I know is the compiler complains if it is there and
>> if it is not there. Catch 22. I end up going to great lengths to hack
>> around compiler errors...
>>
>
> We add requires to templates, so that if they're used outside xserver,
> the caller gets the appropriate require. But then we also use the
> template inside xserver for code reuse, which is where the problem
> creeps up. There are a couple other examples of this in refpolicy, but
> I was able to work around them by reordering statements. It sounds like
> Dan's situation may not be something that can be easily worked around
> without some restructuring
I opened a ticket in the refpolicy Trac for this:
http://oss.tresys.com/projects/refpolicy/ticket/43
--
Eamon Walsh <ewalsh@tycho.nsa.gov>
National Security Agency
--
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.
next prev parent reply other threads:[~2008-06-25 18:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-05 15:11 Trying to get XAce policy straightened out but our tool chain is too broken to handle it Daniel J Walsh
2008-06-06 23:51 ` Eamon Walsh
2008-06-08 19:36 ` Ted X Toth
2008-06-16 14:10 ` Stephen Smalley
2008-06-23 11:17 ` Daniel J Walsh
2008-06-23 13:22 ` Christopher J. PeBenito
2008-06-25 18:28 ` Eamon Walsh [this message]
2008-06-30 14:40 ` Stephen Smalley
2008-06-30 20:09 ` Joshua Brindle
2008-07-03 15:18 ` Joshua Brindle
2008-07-03 16:12 ` 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=48628E65.8030701@tycho.nsa.gov \
--to=ewalsh@tycho.nsa.gov \
--cc=cpebenito@tresys.com \
--cc=dwalsh@redhat.com \
--cc=jbrindle@tresys.com \
--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 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.