All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Smalley <sds@tycho.nsa.gov>
To: 董钰 <dywisdomno1@gmail.com>
Cc: "selinux@tycho.nsa.gov" <selinux@tycho.nsa.gov>,
	"seandroid-list@tycho.nsa.gov" <seandroid-list@tycho.nsa.gov>
Subject: Re: Security label of file in Yaffs2 on Android
Date: Tue, 15 Jan 2013 09:14:47 -0500	[thread overview]
Message-ID: <50F56457.5040904@tycho.nsa.gov> (raw)
In-Reply-To: <CAPG=pdvW9n4oAwankdawNo1u_duQQH=BM0cNNuEhC3Lm_phk+A@mail.gmail.com>

On 01/15/2013 04:52 AM, 董钰 wrote:
> LOL,Too early to end the problem.
> My goal is to "attached every file and dir in android with a security 
> label".
> The files under /data can be setxattr and the change can last after the 
> reboot of the emulator now, but the change of setxattr to the files 
> under /system still can't last after the reboot of the emulator. That's 
> really weird. According to init.rc, both the /data and /system were 
> mounted in yaffs type. I can't figure out any difference between them to 
> cause this.
> ps:
> I modified init.rc to make /system mounted rw.

http://developer.android.com/tools/devices/emulator.html#diskimages

"The emulator does not permit renaming the temporary system image or
persisting it at device power-off."

This is presumably because system images aren't normally modified at
runtime, unlike the user data images.

To create a system image with security labels for SE Android, we
modified mkyaffs2image to create the image with the extended attributes
already set based on our external/sepolicy/file_contexts configuration,
which specifies a mapping from pathname regexes to security contexts.
It shouldn't be hard to generalize our code to support other xattrs.
Our changes to external/yaffs2 have been merged into AOSP.  We also did
the same thing for make_ext4fs (system/extras/ext4_utils), as ext4 is
used on modern devices.





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

      parent reply	other threads:[~2013-01-15 14:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAPG=pduMTUpeY+Goikvh6nOAtcAvxn4h1Ai36H0ihwqfCHs9Eg@mail.gmail.com>
2013-01-14 13:27 ` Security label of file in Yaffs2 on Android Stephen Smalley
2013-01-14 13:35   ` Stephen Smalley
     [not found]   ` <CAPG=pdsAfAFBDakun1JTMOmbNbwdNAFX+=CNGTTVkXJvuAPqGg@mail.gmail.com>
     [not found]     ` <CAPG=pdvVT4fAees1q2FsXafnBrsD8-y3dePbM_OMLAdC==r+nA@mail.gmail.com>
     [not found]       ` <CAPG=pdvW9n4oAwankdawNo1u_duQQH=BM0cNNuEhC3Lm_phk+A@mail.gmail.com>
2013-01-15 14:14         ` 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=50F56457.5040904@tycho.nsa.gov \
    --to=sds@tycho.nsa.gov \
    --cc=dywisdomno1@gmail.com \
    --cc=seandroid-list@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.