Cleanup our tracks

This commit is contained in:
topjohnwu
2020-04-19 03:33:25 -07:00
parent 7188462c55
commit 43029f37b1
4 changed files with 21 additions and 21 deletions

View File

@@ -76,8 +76,11 @@ void restorecon() {
close(fd);
}
void restore_rootcon() {
setfilecon(MAGISKTMP.data(), ROOT_CON);
void restore_tmpcon() {
if (MAGISKTMP == "/sbin")
setfilecon(MAGISKTMP.data(), ROOT_CON);
else
chmod(MAGISKTMP.data(), 0700);
auto dir = xopen_dir(MAGISKTMP.data());
int dfd = dirfd(dir.get());