From: "Michal Mašek" <michal.masek@circletech.net>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: selinux@tycho.nsa.gov, "Craig, Robert P." <rpcraig@tycho.ncsc.mil>
Subject: Re: SEAndroid: Labels of files in /data/data/APPDIR/lib directory
Date: Tue, 10 Jul 2012 17:48:32 +0200 [thread overview]
Message-ID: <4FFC4ED0.8040509@circletech.net> (raw)
In-Reply-To: <1341929590.16964.22.camel@moss-pluto.epoch.ncsc.mil>
On 07/10/2012 04:13 PM, Stephen Smalley wrote:
> The /data/data/APPDIR directory should be labeled with the
> app_data_file
> type (not system_data_file as in your avc denials above) and the same
> category assigned to the app process (i.e. :c38 in the above denial).
The /data/data/APPDIR is labeled with the app_data_file
type as you say it should be:
# ls -lZ /data/data/
...
drwxr-x--x app_38 app_38 u:object_r:app_data_file:s0:c38 net.circletech.cc
However the /data/data/APPDIR/lib and everything in it is labeled with
type system_data_file:
# ls -lZ /data/data/net.circletech.cc/
drwxr-xr-x system system u:object_r:system_data_file:s0 lib
> The fact that it is instead system_data_file suggests that you
> installed
> the app when not running SE Android and did not erase and reflash your
> data partition.
I have built the SEAndroid from sources as full_maguro-eng and I am
running it on Galaxy Nexus. I cleared the cache and userdata before
flashing the system. Getenforce says that the SELinux is running in
permissive mode.
I checked the /data/data directory before installation and the directory
of our application is not there. Than I installed the application via
"adb install" and the directory was created with the above mentioned
labels. I also tried to download the apk file through the android web
browser and installed it from Downloads app but it had the same effect.
Btw. i randomly checked directories of some of the system apps and the
lib subdirectory is always labeled with the system_data_file type, eg.:
# ls -lZ /data/data/com.android.providers.contacts/
drwxrwx--x app_0 app_0 u:object_r:app_data_file:s0:c0 databases
drwxrwx--x app_0 app_0 u:object_r:app_data_file:s0:c0 files
drwxr-xr-x system system u:object_r:system_data_file:s0 lib
drwxrwx--x app_0 app_0 u:object_r:app_data_file:s0:c0 shared_prefs
Isn't it possible that during installation the lib directory is created
somewhere else, somewhere where it would be labeled with
system_data_file type and than moved to /data/data/APPDIR with its label
intact? Or maybe there is something else I am missing?
Thanks for your help,
Michal Mašek
--
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.
next prev parent reply other threads:[~2012-07-10 15:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-10 13:57 SEAndroid: Labels of files in /data/data/APPDIR/lib directory Michal Mašek
2012-07-10 14:13 ` Stephen Smalley
2012-07-10 15:48 ` Michal Mašek [this message]
2012-07-10 15:59 ` Stephen Smalley
2012-07-11 14:32 ` Michal Mašek
2012-07-12 13:59 ` 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=4FFC4ED0.8040509@circletech.net \
--to=michal.masek@circletech.net \
--cc=rpcraig@tycho.ncsc.mil \
--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.