aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2017-03-22 16:57:04 -0500
committerTao Bao2017-03-22 16:58:58 -0500
commite1905adf66ec6bdf877428258b33e237495dd0c3 (patch)
treeccc0c81055c4b07b11381c60872dbe68eae9e719 /recovery.cpp
parentd882b8892a1592101b901dd474de41e56c31b17b (diff)
downloadplatform-bootable-recovery-e1905adf66ec6bdf877428258b33e237495dd0c3.tar.gz
platform-bootable-recovery-e1905adf66ec6bdf877428258b33e237495dd0c3.tar.xz
platform-bootable-recovery-e1905adf66ec6bdf877428258b33e237495dd0c3.zip
recovery: Replace the hard-coded 1000 with AID_SYSTEM.
Test: mmma bootable/recovery Change-Id: Icea5bd91a976957e8b6ab46e367345ff69a53ca4
Diffstat (limited to 'recovery.cpp')
-rw-r--r--recovery.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/recovery.cpp b/recovery.cpp
index 91c511a6..ccb8e5d9 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -53,6 +53,7 @@
53#include <cutils/properties.h> /* for property_list */ 53#include <cutils/properties.h> /* for property_list */
54#include <healthd/BatteryMonitor.h> 54#include <healthd/BatteryMonitor.h>
55#include <private/android_logger.h> /* private pmsg functions */ 55#include <private/android_logger.h> /* private pmsg functions */
56#include <private/android_filesystem_config.h> /* for AID_SYSTEM */
56#include <selinux/label.h> 57#include <selinux/label.h>
57#include <selinux/selinux.h> 58#include <selinux/selinux.h>
58#include <ziparchive/zip_archive.h> 59#include <ziparchive/zip_archive.h>
@@ -460,9 +461,9 @@ static void copy_logs() {
460 copy_log_file(TEMPORARY_INSTALL_FILE, LAST_INSTALL_FILE, false); 461 copy_log_file(TEMPORARY_INSTALL_FILE, LAST_INSTALL_FILE, false);
461 save_kernel_log(LAST_KMSG_FILE); 462 save_kernel_log(LAST_KMSG_FILE);
462 chmod(LOG_FILE, 0600); 463 chmod(LOG_FILE, 0600);
463 chown(LOG_FILE, 1000, 1000); // system user 464 chown(LOG_FILE, AID_SYSTEM, AID_SYSTEM);
464 chmod(LAST_KMSG_FILE, 0600); 465 chmod(LAST_KMSG_FILE, 0600);
465 chown(LAST_KMSG_FILE, 1000, 1000); // system user 466 chown(LAST_KMSG_FILE, AID_SYSTEM, AID_SYSTEM);
466 chmod(LAST_LOG_FILE, 0640); 467 chmod(LAST_LOG_FILE, 0640);
467 chmod(LAST_INSTALL_FILE, 0644); 468 chmod(LAST_INSTALL_FILE, 0644);
468 sync(); 469 sync();