diff options
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/installd/commands.c | 4 | ||||
-rw-r--r-- | cmds/installd/installd.c | 4 | ||||
-rw-r--r-- | cmds/installd/installd.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c index 396771f..a276225 100644 --- a/cmds/installd/commands.c +++ b/cmds/installd/commands.c @@ -271,11 +271,11 @@ int clone_persona_data(uid_t src_persona, uid_t target_persona, int copy) return 0; } -int delete_cache(const char *pkgname) +int delete_cache(const char *pkgname, uid_t persona) { char cachedir[PKG_PATH_MAX]; - if (create_pkg_path(cachedir, pkgname, CACHE_DIR_POSTFIX, 0)) + if (create_pkg_path(cachedir, pkgname, CACHE_DIR_POSTFIX, persona)) return -1; /* delete contents, not the directory, no exceptions */ diff --git a/cmds/installd/installd.c b/cmds/installd/installd.c index a099537..19298a3 100644 --- a/cmds/installd/installd.c +++ b/cmds/installd/installd.c @@ -72,7 +72,7 @@ static int do_free_cache(char **arg, char reply[REPLY_MAX]) /* TODO int:free_siz static int do_rm_cache(char **arg, char reply[REPLY_MAX]) { - return delete_cache(arg[0]); /* pkgname */ + return delete_cache(arg[0], atoi(arg[1])); /* pkgname, userid */ } static int do_get_size(char **arg, char reply[REPLY_MAX]) @@ -142,7 +142,7 @@ struct cmdinfo cmds[] = { { "rename", 2, do_rename }, { "fixuid", 3, do_fixuid }, { "freecache", 1, do_free_cache }, - { "rmcache", 1, do_rm_cache }, + { "rmcache", 2, do_rm_cache }, { "getsize", 5, do_get_size }, { "rmuserdata", 2, do_rm_user_data }, { "movefiles", 0, do_movefiles }, diff --git a/cmds/installd/installd.h b/cmds/installd/installd.h index a229b97..2540dbe 100644 --- a/cmds/installd/installd.h +++ b/cmds/installd/installd.h @@ -199,7 +199,7 @@ int delete_user_data(const char *pkgname, uid_t persona); int make_user_data(const char *pkgname, uid_t uid, uid_t persona); int delete_persona(uid_t persona); int clone_persona_data(uid_t src_persona, uid_t target_persona, int copy); -int delete_cache(const char *pkgname); +int delete_cache(const char *pkgname, uid_t persona); int move_dex(const char *src, const char *dst); int rm_dex(const char *path); int protect(char *pkgname, gid_t gid); |