diff options
author | Stephen Smalley <sds@tycho.nsa.gov> | 2012-01-13 08:43:27 -0500 |
---|---|---|
committer | Stephen Smalley <sds@tycho.nsa.gov> | 2012-01-18 08:47:07 -0500 |
commit | f0429097a74dc0341bb7e6e4825152fc36b657f0 (patch) | |
tree | 0bbe7f2daac6bea3d2b70ab3c787b25e384602f8 /dalvik | |
parent | a68fdbbaee6760998cbcc6b340b35dc4cf0b3138 (diff) | |
download | libcore-f0429097a74dc0341bb7e6e4825152fc36b657f0.zip libcore-f0429097a74dc0341bb7e6e4825152fc36b657f0.tar.gz libcore-f0429097a74dc0341bb7e6e4825152fc36b657f0.tar.bz2 |
Extend forkAndSpecialize to take further input arguments.
Extend forkAndSpecialize to take two further input arguments,
a seInfo string and the niceName for the process. These can be used
as further selectors in determining the SELinux security context for
the process.
Change-Id: If3a654070025e699b2266425f6eb8ab7e6b8c562
Diffstat (limited to 'dalvik')
-rw-r--r-- | dalvik/src/main/java/dalvik/system/Zygote.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/dalvik/src/main/java/dalvik/system/Zygote.java b/dalvik/src/main/java/dalvik/system/Zygote.java index 28c9912..ec114ed 100644 --- a/dalvik/src/main/java/dalvik/system/Zygote.java +++ b/dalvik/src/main/java/dalvik/system/Zygote.java @@ -107,20 +107,23 @@ public class Zygote { * dimension having a length of 3 and representing * (resource, rlim_cur, rlim_max). These are set via the posix * setrlimit(2) call. + * @param seInfo null-ok a string specifying SEAndroid information for + * the new process. + * @param niceName null-ok a string specifying the process name. * * @return 0 if this is the child, pid of the child * if this is the parent, or -1 on error. */ public static int forkAndSpecialize(int uid, int gid, int[] gids, - int debugFlags, int[][] rlimits) { + int debugFlags, int[][] rlimits, String seInfo, String niceName) { preFork(); - int pid = nativeForkAndSpecialize(uid, gid, gids, debugFlags, rlimits); + int pid = nativeForkAndSpecialize(uid, gid, gids, debugFlags, rlimits, seInfo, niceName); postFork(); return pid; } native public static int nativeForkAndSpecialize(int uid, int gid, - int[] gids, int debugFlags, int[][] rlimits); + int[] gids, int debugFlags, int[][] rlimits, String seInfo, String niceName); /** * Forks a new VM instance. @@ -130,7 +133,7 @@ public class Zygote { public static int forkAndSpecialize(int uid, int gid, int[] gids, boolean enableDebugger, int[][] rlimits) { int debugFlags = enableDebugger ? DEBUG_ENABLE_DEBUGGER : 0; - return forkAndSpecialize(uid, gid, gids, debugFlags, rlimits); + return forkAndSpecialize(uid, gid, gids, debugFlags, rlimits, null, null); } /** @@ -175,7 +178,7 @@ public class Zygote { public static int forkSystemServer(int uid, int gid, int[] gids, boolean enableDebugger, int[][] rlimits) { int debugFlags = enableDebugger ? DEBUG_ENABLE_DEBUGGER : 0; - return forkAndSpecialize(uid, gid, gids, debugFlags, rlimits); + return forkAndSpecialize(uid, gid, gids, debugFlags, rlimits, null, null); } native public static int nativeForkSystemServer(int uid, int gid, |