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:
@@ -40,6 +40,7 @@ extern "C"
|
||||
#include "variables.h"
|
||||
#include "twrp-functions.hpp"
|
||||
#include "twrpDigest.hpp"
|
||||
#include "set_metadata.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -79,6 +80,7 @@ int twrpDigest::write_md5digest(void) {
|
||||
md5string += basename((char*) md5fn.c_str());
|
||||
md5string += + "\n";
|
||||
TWFunc::write_file(md5file, md5string);
|
||||
tw_set_default_metadata(md5file.c_str());
|
||||
LOGINFO("MD5 for %s: %s\n", md5fn.c_str(), md5string.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user