mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-08-14 07:17:25 +00:00
Allow su to work when manager uninstalled
This commit is contained in:
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);
|
||||
|
||||
|
Reference in New Issue
Block a user