From 3316fe472fd68377eba9983c43dfce4281209103 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Wed, 27 Aug 2014 10:46:25 -0700 Subject: [PATCH] Make clear data stricter. It should nuke everything under the data directory. PMS will come around and generate the lib symlink after we're finished. Bug: 16739202 Change-Id: Ib70af2e1450e3bed6781fb497b9cc67e1e594c49 --- cmds/installd/commands.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c index 1fda15adea..83ab2a8218 100644 --- a/cmds/installd/commands.c +++ b/cmds/installd/commands.c @@ -177,10 +177,6 @@ int fix_uid(const char *pkgname, uid_t uid, gid_t gid) return 0; } -static int lib_dir_matcher(const char* file_name, const int is_dir) { - return is_dir && !strcmp(file_name, "lib"); -} - int delete_user_data(const char *pkgname, userid_t userid) { char pkgdir[PKG_PATH_MAX]; @@ -188,8 +184,7 @@ int delete_user_data(const char *pkgname, userid_t userid) if (create_pkg_path(pkgdir, pkgname, PKG_DIR_POSTFIX, userid)) return -1; - /* delete contents, excluding "lib", but not the directory itself */ - return delete_dir_contents(pkgdir, 0, &lib_dir_matcher); + return delete_dir_contents(pkgdir, 0, NULL); } int make_user_data(const char *pkgname, uid_t uid, userid_t userid, const char* seinfo) -- 2.11.0