fix: prevent node mode to be used as script runner by other apps (#40579)
This commit is contained in:
parent
9aa73abe78
commit
cb0da6ff34
8 changed files with 301 additions and 88 deletions
19
shell/common/mac/codesign_util.h
Normal file
19
shell/common/mac/codesign_util.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2023 Microsoft, Inc.
|
||||
// Copyright 2013 The Chromium Authors
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_COMMON_MAC_CODESIGN_UTIL_H_
|
||||
#define SHELL_COMMON_MAC_CODESIGN_UTIL_H_
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
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);
|
||||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_COMMON_MAC_CODESIGN_UTIL_H_
|
Loading…
Add table
Add a link
Reference in a new issue