diff options
Diffstat (limited to 'cmds/installd/commands.c')
-rw-r--r-- | cmds/installd/commands.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c index fc3972e..c6ae91a 100644 --- a/cmds/installd/commands.c +++ b/cmds/installd/commands.c @@ -144,7 +144,6 @@ int fix_uid(const char *pkgname, uid_t uid, gid_t gid) { char pkgdir[PKG_PATH_MAX]; struct stat s; - int rc = 0; if ((uid < AID_SYSTEM) || (gid < AID_SYSTEM)) { ALOGE("invalid uid/gid: %d %d\n", uid, gid); @@ -647,7 +646,7 @@ static void run_dexopt(int zip_fd, int odex_fd, const char* input_file_name, } static void run_patchoat(int input_fd, int oat_fd, const char* input_file_name, - const char* output_file_name, const char *pkgname, const char *instruction_set) + const char* output_file_name, const char *pkgname __unused, const char *instruction_set) { static const int MAX_INT_LEN = 12; // '-'+10dig+'\0' -OR- 0x+8dig static const unsigned int MAX_INSTRUCTION_SET_LEN = 7; @@ -669,7 +668,7 @@ static void run_patchoat(int input_fd, int oat_fd, const char* input_file_name, sprintf(instruction_set_arg, "--instruction-set=%s", instruction_set); sprintf(output_oat_fd_arg, "--output-oat-fd=%d", oat_fd); sprintf(input_oat_fd_arg, "--input-oat-fd=%d", input_fd); - ALOGE("Running %s isa=%s in-fd=%d (%s) out-fd=%d (%s)\n", + ALOGV("Running %s isa=%s in-fd=%d (%s) out-fd=%d (%s)\n", PATCHOAT_BIN, instruction_set, input_fd, input_file_name, oat_fd, output_file_name); /* patchoat, patched-image-location, no-lock, isa, input-fd, output-fd */ @@ -1542,7 +1541,7 @@ int restorecon_data(const char* pkgName, const char* seinfo, uid_t uid) continue; } - if (selinux_android_restorecon_pkgdir(pkgdir, seinfo, uid, flags) < 0) { + if (selinux_android_restorecon_pkgdir(pkgdir, seinfo, s.st_uid, flags) < 0) { ALOGE("restorecon failed for %s: %s\n", pkgdir, strerror(errno)); ret |= -1; } |