mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-24 18:37:39 +00:00
Make sepolicy.rules relative if possible
This commit is contained in:
parent
8331206acb
commit
910a36fdc1
@ -202,8 +202,16 @@ persist:
|
||||
success:
|
||||
// Create symlinks so we don't need to go through this logic again
|
||||
strcpy(p, "/sepolicy.rules");
|
||||
if (char *rel = strstr(custom_rules_dir.data(), MIRRDIR)) {
|
||||
// Create symlink with relative path
|
||||
char s[128];
|
||||
s[0] = '.';
|
||||
strlcpy(s + 1, rel + sizeof(MIRRDIR) - 1, sizeof(s) - 1);
|
||||
xsymlink(s, path);
|
||||
} else {
|
||||
xsymlink(custom_rules_dir.data(), path);
|
||||
}
|
||||
}
|
||||
|
||||
bool LegacySARInit::mount_system_root() {
|
||||
backup_files();
|
||||
|
Loading…
x
Reference in New Issue
Block a user