From e1905adf66ec6bdf877428258b33e237495dd0c3 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Wed, 22 Mar 2017 14:57:04 -0700 Subject: recovery: Replace the hard-coded 1000 with AID_SYSTEM. Test: mmma bootable/recovery Change-Id: Icea5bd91a976957e8b6ab46e367345ff69a53ca4 --- recovery.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recovery.cpp b/recovery.cpp index 91c511a6a..ccb8e5d95 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -53,6 +53,7 @@ #include /* for property_list */ #include #include /* private pmsg functions */ +#include /* for AID_SYSTEM */ #include #include #include @@ -460,9 +461,9 @@ static void copy_logs() { copy_log_file(TEMPORARY_INSTALL_FILE, LAST_INSTALL_FILE, false); save_kernel_log(LAST_KMSG_FILE); chmod(LOG_FILE, 0600); - chown(LOG_FILE, 1000, 1000); // system user + chown(LOG_FILE, AID_SYSTEM, AID_SYSTEM); chmod(LAST_KMSG_FILE, 0600); - chown(LAST_KMSG_FILE, 1000, 1000); // system user + chown(LAST_KMSG_FILE, AID_SYSTEM, AID_SYSTEM); chmod(LAST_LOG_FILE, 0640); chmod(LAST_INSTALL_FILE, 0644); sync(); -- cgit v1.2.3