mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-28 12:35:26 +00:00
Allow su to work when manager uninstalled
This commit is contained in:
parent
2b6c271d37
commit
190d857949
3
db.c
3
db.c
@ -142,8 +142,7 @@ stat_requester:
|
||||
sprintf(buffer, "%s/0/%s", base, ctx->info->pkg_name);
|
||||
if (stat(buffer, &ctx->info->st) == -1) {
|
||||
LOGE("su: cannot find requester");
|
||||
ctx->info->policy = DENY;
|
||||
ctx->notify = 0;
|
||||
memset(&ctx->info->st, 0, sizeof(ctx->info->st));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
su.c
2
su.c
@ -309,7 +309,7 @@ int su_daemon_main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
// New request or no db exist, notify user for response
|
||||
if (su_ctx->info->policy == QUERY) {
|
||||
if (su_ctx->info->policy == QUERY && su_ctx->info->st.st_uid != 0) {
|
||||
socket_serv_fd = socket_create_temp(su_ctx->sock_path, sizeof(su_ctx->sock_path));
|
||||
setup_sighandlers(cleanup_signal);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user