diff options
author | Robert Craig <rpcraig@tycho.ncsc.mil> | 2014-03-27 10:21:12 -0400 |
---|---|---|
committer | Robert Craig <rpcraig@tycho.ncsc.mil> | 2014-03-28 14:32:07 -0400 |
commit | da30dc7336f03ca629fe173db1425fdce989119c (patch) | |
tree | 35470825c4a83e9f0d878d34e84fb95bb2026a64 /cmds/installd/installd.c | |
parent | 50ef8562fe7289495ad8592226f3c4d546119892 (diff) | |
download | frameworks_native-da30dc7336f03ca629fe173db1425fdce989119c.zip frameworks_native-da30dc7336f03ca629fe173db1425fdce989119c.tar.gz frameworks_native-da30dc7336f03ca629fe173db1425fdce989119c.tar.bz2 |
Modify installd's restorecon function.
Changes above with PMS and below with libselinux
have resulted in a few changes to the restorecon data
api. This change is needed in order to support the new
way to issue a recursive restorecon of certain
/data/data directories.
The restorecondata function has also been modified to
find all users on the device for a given package name
(argument to the function) and to issue a separate
recursive restorecon call for each.
Change-Id: Ie440cba2c96f0907458086348197e1506d31c1b6
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
Diffstat (limited to 'cmds/installd/installd.c')
-rw-r--r-- | cmds/installd/installd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmds/installd/installd.c b/cmds/installd/installd.c index a080ee6..a078e1c 100644 --- a/cmds/installd/installd.c +++ b/cmds/installd/installd.c @@ -129,10 +129,10 @@ static int do_idmap(char **arg, char reply[REPLY_MAX]) return idmap(arg[0], arg[1], atoi(arg[2])); } -static int do_restorecon_data(char **arg __attribute__((unused)), - char reply[REPLY_MAX] __attribute__((unused))) +static int do_restorecon_data(char **arg, char reply[REPLY_MAX] __attribute__((unused))) { - return restorecon_data(); + return restorecon_data(arg[0], arg[1], atoi(arg[2])); + /* pkgName, seinfo, uid*/ } struct cmdinfo { @@ -159,7 +159,7 @@ struct cmdinfo cmds[] = { { "mkuserdata", 4, do_mk_user_data }, { "rmuser", 1, do_rm_user }, { "idmap", 3, do_idmap }, - { "restorecondata", 0, do_restorecon_data }, + { "restorecondata", 3, do_restorecon_data }, }; static int readx(int s, void *_buf, int count) |