From: Joshua Brindle <brindle@quarksecurity.com>
To: William Roberts <bill.c.roberts@gmail.com>
Cc: selinux@tycho.nsa.gov, Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: Find attributes for a type with sepol
Date: Tue, 29 Sep 2015 15:35:00 -0400 [thread overview]
Message-ID: <560AE7E4.4040401@quarksecurity.com> (raw)
In-Reply-To: <CAFftDdpyUtkUKeRg7d98vVeU3ZOWMq1RCr+5DHcyOur2xh_gYw@mail.gmail.com>
William Roberts wrote:
> On Sep 29, 2015 12:12 PM, "Joshua Brindle"<brindle@quarksecurity.com>
> wrote:
>> William Roberts wrote:
>>> Out of curiosity, whats the purpose of the types field in the struct
>>> type_datum? This seems to never have anything in it.
>>>
>> type_datum is used for both types and attributes (as designated by the
> flavor field). In the attribute case the types field is the ebitmap of
> types have have this attribute.
>
> What about if its a type, is it an ebitmap of attrs?
No, but as Stephen said below there is a type_attr_map that contains that.
>
> It is set in checkpolicy, look at policy_define.c:define_typeattribute().
>>
>>
>>> Also, conditional.h has a field called bool, this would seem to conflict
>>> with stdbool.h, whats the consensus on renaming this to boolean perhaps?
>>>
>> probably...
>>
>>
>>> On Thu, Sep 24, 2015 at 6:58 AM, Joshua Brindle<brindle@quarksecurity.com
>>> wrote:
>>>
>>>> Stephen Smalley wrote:
>>>>
>>>>> On 09/24/2015 08:43 AM, James Carter wrote:
>>>>>
>>>>>> On 09/23/2015 06:39 PM, Roberts, William C wrote:
>>>>>>
>>>>>>> How would one find all the attributes of a type with libsepol, can
>>>>>>> someone point me to any relevant structures or functions?
>>>>>>>
>>>>>>> The policydb_t structure has type_attr_map field which maps types to
> an
>>>>>> ebitmap of attributes.
>>>>>>
>>>>> It also has the reverse map (attr_type_map) if you want that.
>>>>>
>>>>> In Android, external/sepolicy/tools/sepolicy-analyze has examples of
>>>>> using both maps.
>>>>>
>>>>>
>>>> seinfo also knows how to do it, if you need more examples:
>>>>
>>>> $ seinfo -x -tuntrusted_app sepolicy
>>>> untrusted_app
>>>> bluetoothdomain
>>>> netdomain
>>>> appdomain
>>>> domain
>>>>
>>>> _______________________________________________
>>>> Selinux mailing list
>>>> Selinux@tycho.nsa.gov
>>>> To unsubscribe, send email to Selinux-leave@tycho.nsa.gov.
>>>> To get help, send an email containing "help" to
>>>> Selinux-request@tycho.nsa.gov.
>>>>
>>>
>>>
>
next prev parent reply other threads:[~2015-09-29 19:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-23 22:39 Find attributes for a type with sepol Roberts, William C
2015-09-24 12:43 ` James Carter
2015-09-24 12:59 ` Stephen Smalley
2015-09-24 13:58 ` Joshua Brindle
2015-09-29 18:15 ` William Roberts
2015-09-29 19:11 ` Joshua Brindle
2015-09-29 19:33 ` William Roberts
2015-09-29 19:35 ` Joshua Brindle [this message]
2015-09-29 19:36 ` William Roberts
2015-09-29 20:19 ` William Roberts
2015-09-29 20:25 ` Stephen Smalley
2015-09-29 20:51 ` William Roberts
2015-09-29 21:04 ` 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=560AE7E4.4040401@quarksecurity.com \
--to=brindle@quarksecurity.com \
--cc=bill.c.roberts@gmail.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.