kernel: refine syscall_hook_manager
- Don't unmark process when setuid if syscall tracepoint is in use - Remark process when app profile updated - Ensure zygote is marked on first boot
This commit is contained in:
@@ -111,7 +111,7 @@ bool is_ksu_domain()
|
||||
return is_task_ksu_domain(current_cred());
|
||||
}
|
||||
|
||||
bool is_zygote(const struct cred* cred)
|
||||
bool is_context(const struct cred* cred, const char* context)
|
||||
{
|
||||
if (!cred) {
|
||||
return false;
|
||||
@@ -126,11 +126,20 @@ bool is_zygote(const struct cred* cred)
|
||||
if (err) {
|
||||
return false;
|
||||
}
|
||||
result = strncmp("u:r:zygote:s0", ctx.context, ctx.len) == 0;
|
||||
result = strncmp(context, ctx.context, ctx.len) == 0;
|
||||
__security_release_secctx(&ctx);
|
||||
return result;
|
||||
}
|
||||
|
||||
bool is_zygote(const struct cred* cred)
|
||||
{
|
||||
return is_context(cred, "u:r:zygote:s0");
|
||||
}
|
||||
|
||||
bool is_init(const struct cred* cred) {
|
||||
return is_context(cred, "u:r:init:s0");
|
||||
}
|
||||
|
||||
#define KSU_FILE_DOMAIN "u:object_r:ksu_file:s0"
|
||||
|
||||
u32 ksu_get_ksu_file_sid()
|
||||
|
||||
Reference in New Issue
Block a user