fix: ignore all NODE_ envs from foreign parent in node process (#40770)
* fix: ignore all NODE_ envs from foreign parent * fix: recognize ad-hoc signed binary
This commit is contained in:
parent
baca2e302d
commit
dfce1a9eb4
8 changed files with 115 additions and 16 deletions
|
@ -10,9 +10,14 @@
|
|||
|
||||
namespace electron {
|
||||
|
||||
// Given a pid, check if the process belongs to current app by comparing its
|
||||
// code signature with current app.
|
||||
bool ProcessBelongToCurrentApp(pid_t pid);
|
||||
// Given a pid, return true if the process has the same code signature with
|
||||
// with current app.
|
||||
// This API returns true if current app is not signed or ad-hoc signed, because
|
||||
// checking code signature is meaningless in this case, and failing the
|
||||
// signature check would break some features with unsigned binary (for example,
|
||||
// process.send stops working in processes created by child_process.fork, due
|
||||
// to the NODE_CHANNEL_ID env getting removed).
|
||||
bool ProcessSignatureIsSameWithCurrentApp(pid_t pid);
|
||||
|
||||
} // namespace electron
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue