Attempt to set the proper uid/gid/contexts on new files and dirs
Files and folders that we create during backups, copy log, or MTP operations often do not have the proper uid/gid/contexts assigned. We will attempt to read the proper contexts from the settings storage path and assign those same contexts to any files or dirs that we create. Change-Id: I769f9479854122b49b499de2175e6e2d026f8afd
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include "fixPermissions.hpp"
|
||||
#include "twrpDigest.hpp"
|
||||
#include "twrpDU.hpp"
|
||||
#include "set_metadata.h"
|
||||
|
||||
#ifdef TW_HAS_MTP
|
||||
#include "mtp/mtp_MtpServer.hpp"
|
||||
@@ -757,6 +758,7 @@ int TWPartitionManager::Run_Backup(void) {
|
||||
gui_print_color("highlight", "[BACKUP COMPLETED IN %d SECONDS]\n\n", total_time); // the end
|
||||
string backup_log = Full_Backup_Path + "recovery.log";
|
||||
TWFunc::copy_file("/tmp/recovery.log", backup_log, 0644);
|
||||
tw_set_default_metadata(backup_log.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user