All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Brindle <jbrindle@tresys.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: <selinux@tycho.nsa.gov>
Subject: Re: seandroid and policy version
Date: Wed, 11 Jul 2012 15:45:11 -0400	[thread overview]
Message-ID: <4FFDD7C7.4020703@tresys.com> (raw)
In-Reply-To: <1342011045.29461.28.camel@moss-pluto.epoch.ncsc.mil>

Stephen Smalley wrote:
> On Tue, 2012-07-10 at 20:07 -0400, Joshua Brindle wrote:
>> I was looking at this:
>> <https://android-review.googlesource.com/#/c/36321/4/init/init.c>
>>
>> and remembered that years ago we had a discussion about the .policyver
>> filename syntax. I kind of get it for SELinux machines where there is
>> managed policy and could be multiple policies on the system but since
>> SEAndroid is targeting non-device managed policies, it adds extra code
>> to search for the right extension and you can tell what version the
>> policy is as soon as you open it, why not ditch the suffix?
>
> First, that patch doesn't introduce the use of the version suffix
> (that's in the already merged code); it just preserves it in the new
> logic for reloading policy at runtime.

I know, it just reminded me that I wanted to mention it :)

>
> I'm open to removing the use of the policy version suffix in a follow-on
> patch, although that would need to be coordinated across sepolicy and
> system/core.  But the current code is consistent with existing practice
> in Linux distributions (so follows principle of least surprise) and it

 From what I can tell most people doing anything with SEAndroid have never been 
exposed to SELinux so it probably is surprising to them that the file extension 
would change version to version.

> allows for different versions to be installed simultaneously (thereby
> supporting booting multiple kernels).  Also, we don't have libsepol on

I don't think this will ever be an issue on mobile devices (and I don't think it 
ever was an issue on real machines, more likely that stale policies were being 
enforced if there was some kernel or library change)

> the device so we cannot in fact determine the version when we open it
> there presently.  So I'm not convinced we should remove the suffix.

We don't need libsepol, just read the first few bytes, a la file.

--
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-07-11 19:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11  0:07 seandroid and policy version Joshua Brindle
2012-07-11 12:50 ` Stephen Smalley
2012-07-11 19:45   ` Joshua Brindle [this message]
2012-07-11 19:49     ` Stephen Smalley
2012-09-18 17:33       ` Stephen Smalley
2012-09-18 17:40         ` Joshua Brindle
2012-09-18 17:43           ` Stephen Smalley
2012-09-18 17:56             ` Joshua Brindle
2012-09-18 18:21               ` Stephen Smalley
2012-09-18 17:46         ` William Roberts
2012-09-18 17:50           ` Stephen Smalley
2012-09-18 17:54           ` William Roberts
2012-09-18 17:57             ` William Roberts
2012-09-18 18:10               ` Stephen Smalley
2012-09-18 18:15             ` Stephen Smalley
2012-09-18 18:25               ` William Roberts
2012-09-18 18:26                 ` William Roberts
2012-09-18 18:52                 ` Stephen Smalley
2012-09-18 18:59                   ` William Roberts
2012-09-18 19:04                   ` Joshua Brindle
2012-09-18 19:07                     ` William Roberts
2012-09-18 19:10                       ` Joshua Brindle

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=4FFDD7C7.4020703@tresys.com \
    --to=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.