Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable Chromium sandbox v2 in MAS builds (backport: 5-0-x) #16969

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion BUILD.gn
Expand Up @@ -620,8 +620,10 @@ if (is_mac) {
output_name = electron_helper_name
deps = [
":electron_framework+link",
"//sandbox/mac:seatbelt",
]
if (!is_mas_build) {
deps += [ "//sandbox/mac:seatbelt" ]
}
defines = [ "HELPER_EXECUTABLE" ]
sources = filenames.app_sources
include_dirs = [ "." ]
Expand Down
8 changes: 4 additions & 4 deletions atom/app/atom_main.cc
Expand Up @@ -43,9 +43,9 @@
#include "base/i18n/icu_util.h"
#include "electron/buildflags/buildflags.h"

#if defined(HELPER_EXECUTABLE)
#if defined(HELPER_EXECUTABLE) && !defined(MAS_BUILD)
#include "sandbox/mac/seatbelt_exec.h" // nogncheck
#endif // defined(HELPER_EXECUTABLE)
#endif

namespace {

Expand Down Expand Up @@ -213,7 +213,7 @@ int main(int argc, char* argv[]) {
}
#endif

#if defined(HELPER_EXECUTABLE)
#if defined(HELPER_EXECUTABLE) && !defined(MAS_BUILD)
uint32_t exec_path_size = 0;
int rv = _NSGetExecutablePath(NULL, &exec_path_size);
if (rv != -1) {
Expand All @@ -240,7 +240,7 @@ int main(int argc, char* argv[]) {
abort();
}
}
#endif
#endif // defined(HELPER_EXECUTABLE) && !defined(MAS_BUILD)

return AtomMain(argc, argv);
}
Expand Down