summaryrefslogtreecommitdiffstats
path: root/include/private
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2010-03-02 18:05:23 -0800
committerDavid 'Digit' Turner <digit@google.com>2010-03-17 11:02:08 -0700
commit1f4d95296acf34a93128332441782a80c10845b4 (patch)
tree2b8cf38a4716b2c622c564d3a7da82022cdaf9c9 /include/private
parent5fc070be8593f39f5140ab63fb6f5eccceb1dc83 (diff)
downloadsystem_core-1f4d95296acf34a93128332441782a80c10845b4.zip
system_core-1f4d95296acf34a93128332441782a80c10845b4.tar.gz
system_core-1f4d95296acf34a93128332441782a80c10845b4.tar.bz2
Add 'run-as' command implementation as set-uid program.
Typical usage is 'run-as <package-name> <command>' to run <command> in the data directory, and the user id, of <package-name> if, and only if <package-name> is the name of an installed and debuggable application. This relies on the /data/system/packages.list file generated by the PackageManager service. BEWARE: This is intended to be available on production devices !
Diffstat (limited to 'include/private')
-rw-r--r--include/private/android_filesystem_config.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/private/android_filesystem_config.h b/include/private/android_filesystem_config.h
index f2a5fe1..4cab96a 100644
--- a/include/private/android_filesystem_config.h
+++ b/include/private/android_filesystem_config.h
@@ -169,7 +169,7 @@ static struct fs_path_config android_files[] = {
* Do not change. */
{ 02755, AID_ROOT, AID_NET_RAW, "system/bin/ping" },
{ 02750, AID_ROOT, AID_INET, "system/bin/netcfg" },
- /* the following four files are INTENTIONALLY set-uid, but they
+ /* the following five files are INTENTIONALLY set-uid, but they
* are NOT included on user builds. */
{ 06755, AID_ROOT, AID_ROOT, "system/xbin/su" },
{ 06755, AID_ROOT, AID_ROOT, "system/xbin/librank" },
@@ -177,6 +177,9 @@ static struct fs_path_config android_files[] = {
{ 06755, AID_ROOT, AID_ROOT, "system/xbin/procmem" },
{ 06755, AID_ROOT, AID_ROOT, "system/xbin/tcpdump" },
{ 04770, AID_ROOT, AID_RADIO, "system/bin/pppd-ril" },
+ /* the following file is INTENTIONALLY set-uid, and IS included
+ * in user builds. */
+ { 06750, AID_ROOT, AID_SHELL, "system/bin/run-as" },
{ 00755, AID_ROOT, AID_SHELL, "system/bin/*" },
{ 00755, AID_ROOT, AID_SHELL, "system/xbin/*" },
{ 00750, AID_ROOT, AID_SHELL, "sbin/*" },