All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Smalley <sds@tycho.nsa.gov>
To: Bryan Hinton <bryan@bryanhinton.com>
Cc: William Roberts <bill.c.roberts@gmail.com>, selinux@tycho.nsa.gov
Subject: Re: Tuna policy files
Date: Mon, 21 May 2012 10:20:58 -0400	[thread overview]
Message-ID: <1337610058.28413.30.camel@moss-pluto> (raw)
In-Reply-To: <CA+XzHePeSU7Vrm96uOztQYoqxhHrv8z+bV=X4QZ8qS6WMQOGwQ@mail.gmail.com>

On Fri, 2012-05-18 at 22:08 -0700, Bryan Hinton wrote:
> It seems that for the VZW Galaxy Nexus, sepolicy.fc and sepolicy.te
> files should reside in device/samsung/toro.
> ueventd.tuna.rc contains the names of the LTE RIL device nodes.
> I have these device nodes labeled in device/samsung/toro/sepolicy.fc
> for the Galaxy Nexus.
> 
> For GSM/HSPA+ Galaxy Nexus, the relevant device nodes are also listed
> in ueventd.tuna.rc.
> It appears that they were never separated out. But given that there
> are other model-specific device nodes
> that have to be labeled correctly in their respective directories, it
> seems logical to separate things.
> For example,  device/samsung/crespo/sepolicy.fc would contain a label
> for /dev/pn544 while
> device/samsung/toro would contain a label for /dev/ttyO3.

What we have done presently is created trivial sepolicy.{te,fc} files
under toro and maguro that simply contain a single include line to
inherit the tuna definitions, e.g.
include(`device/samsung/tuna/sepolicy.te')

This is similar to how they handle BoardConfig.mk and device.mk, which
likewise include the tuna files.

This required a small change to sepolicy/Android.mk to apply m4 as a
preprocessor for .fc files (was already being applied for .te files) so
that we can support includes in both kinds of files.

You could still add device-specific lines after the include directive
for entries that are truly unique to toro or maguro, but this avoids
duplicating the entries that they have in common in both directories.

> Lastly, regarding the proper labeling of factory, are you using the
> init.tuna.rc patch that I added on Mar 6?


-- 
Stephen Smalley
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.

      reply	other threads:[~2012-05-21 14:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAFftDdp=i5a0s=MERWsHjJb3soMEU8s_nKDpT=OHJXu12iBZjw@mail.gmail.com>
     [not found] ` <1337185286.10285.94.camel@moss-pluto>
2012-05-18 12:54   ` Tuna policy files Stephen Smalley
2012-05-19  5:08     ` Bryan Hinton
2012-05-21 14:20       ` Stephen Smalley [this message]

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=1337610058.28413.30.camel@moss-pluto \
    --to=sds@tycho.nsa.gov \
    --cc=bill.c.roberts@gmail.com \
    --cc=bryan@bryanhinton.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.