There were bugs in the toybox commands which implemented "ls". See, for
example:

*
http://lists.landley.net/pipermail/toybox-landley.net/2015-December/004620.html
* https://android-review.googlesource.com/#/c/196871/
* https://android-review.googlesource.com/195542

It looks like these fixes might have missed the first preview build. I
believe the workaround for this is to run "ls -lZL /mnt"

-- Nick

On Thu, Apr 7, 2016 at 4:45 AM, Filippo Bonazzi <[email protected]>
wrote:

> Hello,
>
> I was working with an Android N Preview emulator over adb, and I noticed
> that when I run "ls -Z", symlinks do not show their SELinux context, but
> "?" instead. e.g.:
> > $ adb shell id -Z
> > context=u:r:su:s0
> > $ adb shell ls -lZ /mnt
> > ...
> > lrwxrwxrwx 1 root root ? 7 2016-04-01 16:30 sdcard -> /sdcard
>
> This happens for all symlinks, on an emulator built with the default
> AOSP Android N Preview x86 emulator image distributed with the Android
> SDK, with SELinux enabled and enforcing, running adb as root.
> "ls" is running in the "u:r:su:s0" context.
> I see no permission denials in dmesg. I have tried putting SELinux in
> permissive mode, and it does not change anything.
>
> Does anyone know why this is happening?
>
> Thank you,
>
> Filippo
> _______________________________________________
> Seandroid-list mailing list
> [email protected]
> To unsubscribe, send email to [email protected].
> To get help, send an email containing "help" to
> [email protected].
>



-- 
Nick Kralevich | Android Security | [email protected] | 650.214.4037
_______________________________________________
Seandroid-list mailing list
[email protected]
To unsubscribe, send email to [email protected].
To get help, send an email containing "help" to 
[email protected].

Reply via email to