Change permissions of apps' home dir to 0700 for SDK > 23
This patchset changes the installd such that apps' home
directory has permissions set to 0700 if build for a
target SDK version. In consequence the commands
create_app_data and move_complete_app
get one more parameter, the target SDK version.
Apps built for a lower SDK version will still have
home directories with permissions set to 0751.
Bug: 7208882
Change-Id: I0213834dd946c72f5d7e31965a9dc517ced268db
diff --git a/cmds/installd/commands.h b/cmds/installd/commands.h
index 5510e7b..b3ebc7d 100644
--- a/cmds/installd/commands.h
+++ b/cmds/installd/commands.h
@@ -29,14 +29,14 @@
namespace installd {
int create_app_data(const char *uuid, const char *pkgname, userid_t userid, int flags,
- appid_t appid, const char* seinfo);
+ appid_t appid, const char* seinfo, int target_sdk_version);
int restorecon_app_data(const char* uuid, const char* pkgName, userid_t userid, int flags,
appid_t appid, const char* seinfo);
int clear_app_data(const char *uuid, const char *pkgname, userid_t userid, int flags);
int destroy_app_data(const char *uuid, const char *pkgname, userid_t userid, int flags);
int move_complete_app(const char* from_uuid, const char *to_uuid, const char *package_name,
- const char *data_app_name, appid_t appid, const char* seinfo);
+ const char *data_app_name, appid_t appid, const char* seinfo, int target_sdk_version);
int get_app_size(const char *uuid, const char *pkgname, int userid, int flags,
const char *apkpath, const char *libdirpath, const char *fwdlock_apkpath,