зеркало из https://github.com/microsoft/BuildXL.git
Merged PR 585498: [LinuxSandbox] Report new process when libDetours.so is dynamically loaded
When a process is executed in a root jail, the root process under `chroot` is not being reported without this change.
This commit is contained in:
Родитель
88ca62fdc8
Коммит
818015320b
|
@ -71,7 +71,7 @@ INTERPOSE(int, clone, int (*fn)(void *), void *child_stack, int flags, void *arg
|
|||
})
|
||||
|
||||
INTERPOSE(int, fexecve, int fd, char *const argv[], char *const envp[])({
|
||||
bxl->report_access_fd(__func__, ES_EVENT_TYPE_NOTIFY_EXEC, fd);
|
||||
bxl->report_access_fd(__func__, ES_EVENT_TYPE_NOTIFY_EXEC, fd);
|
||||
return bxl->fwd_fexecve(fd, argv, bxl->ensureEnvs(envp)).restore();
|
||||
})
|
||||
|
||||
|
@ -588,9 +588,14 @@ static void report_exit(int exitCode, void *args)
|
|||
BxlObserver::GetInstance()->report_access("on_exit", ES_EVENT_TYPE_NOTIFY_EXIT, std::string(""), std::string(""));
|
||||
}
|
||||
|
||||
// invoked by the loader when our shared library is dynamically loaded into a new host process
|
||||
void __attribute__ ((constructor)) _bxl_linux_sandbox_init(void)
|
||||
{
|
||||
on_exit(report_exit, NULL);
|
||||
// set up an on-exit handler
|
||||
on_exit(report_exit, NULL);
|
||||
|
||||
// report that a new process has been created
|
||||
BxlObserver::GetInstance()->report_access("__init__", ES_EVENT_TYPE_NOTIFY_EXEC, __progname);
|
||||
}
|
||||
|
||||
// ==========================
|
||||
|
|
|
@ -3741,7 +3741,7 @@
|
|||
"Type": "NuGet",
|
||||
"NuGet": {
|
||||
"Name": "runtime.linux-x64.BuildXL",
|
||||
"Version": "0.0.41"
|
||||
"Version": "0.0.42"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -377,7 +377,7 @@ config({
|
|||
// Runtime dependencies for Linux
|
||||
{
|
||||
id: "runtime.linux-x64.BuildXL",
|
||||
version: "0.0.41",
|
||||
version: "0.0.42",
|
||||
osSkip: importFile(f`config.microsoftInternal.dsc`).isMicrosoftInternal
|
||||
? []
|
||||
: [ "win", "macOS", "unix" ]
|
||||
|
|
Загрузка…
Ссылка в новой задаче