mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-22 16:07:39 +00:00
Don't skip fd sanitization if fds_to_ignore does not exist
This commit is contained in:
parent
9b3896fd3d
commit
ec115cd7e3
@ -691,9 +691,10 @@ void HookContext::nativeForkAndSpecialize_pre() {
|
|||||||
|
|
||||||
flags[APP_FORK_AND_SPECIALIZE] = true;
|
flags[APP_FORK_AND_SPECIALIZE] = true;
|
||||||
if (args.app->fds_to_ignore == nullptr) {
|
if (args.app->fds_to_ignore == nullptr) {
|
||||||
// if fds_to_ignore does not exist and there's no FileDescriptorTable::Create,
|
// if fds_to_ignore does not exist, we do not have a good way to determine
|
||||||
// we can skip fd sanitization
|
// whether keeping fd open during fork is allowed, as needed symbols may be
|
||||||
flags[SKIP_FD_SANITIZATION] = !dlsym(RTLD_DEFAULT, "_ZN19FileDescriptorTable6CreateEv");
|
// inlined. Better be safe than sorry.
|
||||||
|
flags[SKIP_FD_SANITIZATION] = false;
|
||||||
} else {
|
} else {
|
||||||
int logd_fd = magiskd.get_log_pipe();
|
int logd_fd = magiskd.get_log_pipe();
|
||||||
if (logd_fd >= 0) {
|
if (logd_fd >= 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user