summaryrefslogtreecommitdiff
path: root/devel/electron13/files/patch-content_zygote_zygote__main__linux.cc
diff options
context:
space:
mode:
authorHiroki Tagato <tagattie@FreeBSD.org>2021-11-24 17:28:24 +0900
committerHiroki Tagato <tagattie@FreeBSD.org>2021-11-24 17:30:52 +0900
commit4da4f5edbf9de5c4269cf66d70044f4cb3abdc41 (patch)
tree21363ca7518a943c48bde3a669c78444685f832e /devel/electron13/files/patch-content_zygote_zygote__main__linux.cc
parentports-mgmt/octopkg: update description and WWW (diff)
devel/electron13: update to 13.6.2 (and rename from devel/electron12)
Changelog: https://www.electronjs.org/blog/electron-13-0
Diffstat (limited to 'devel/electron13/files/patch-content_zygote_zygote__main__linux.cc')
-rw-r--r--devel/electron13/files/patch-content_zygote_zygote__main__linux.cc48
1 files changed, 48 insertions, 0 deletions
diff --git a/devel/electron13/files/patch-content_zygote_zygote__main__linux.cc b/devel/electron13/files/patch-content_zygote_zygote__main__linux.cc
new file mode 100644
index 000000000000..514812836617
--- /dev/null
+++ b/devel/electron13/files/patch-content_zygote_zygote__main__linux.cc
@@ -0,0 +1,48 @@
+--- content/zygote/zygote_main_linux.cc.orig 2021-01-07 00:36:34 UTC
++++ content/zygote/zygote_main_linux.cc
+@@ -11,7 +11,9 @@
+ #include <stddef.h>
+ #include <stdint.h>
+ #include <string.h>
++#if !defined(OS_BSD)
+ #include <sys/prctl.h>
++#endif
+ #include <sys/socket.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+@@ -99,6 +101,7 @@ static bool CreateInitProcessReaper(
+ // created through the setuid sandbox.
+ static bool EnterSuidSandbox(sandbox::SetuidSandboxClient* setuid_sandbox,
+ base::OnceClosure post_fork_parent_callback) {
++#if !defined(OS_BSD)
+ DCHECK(setuid_sandbox);
+ DCHECK(setuid_sandbox->IsSuidSandboxChild());
+
+@@ -131,6 +134,9 @@ static bool EnterSuidSandbox(sandbox::SetuidSandboxCli
+
+ CHECK(sandbox::policy::SandboxDebugHandling::SetDumpableStatusAndHandlers());
+ return true;
++#else
++ return false;
++#endif // !defined(OS_BSD)
+ }
+
+ static void DropAllCapabilities(int proc_fd) {
+@@ -176,6 +182,7 @@ static void EnterLayerOneSandbox(sandbox::policy::Sand
+
+ bool ZygoteMain(
+ std::vector<std::unique_ptr<ZygoteForkDelegate>> fork_delegates) {
++#if !defined(OS_BSD)
+ sandbox::SetAmZygoteOrRenderer(true, GetSandboxFD());
+
+ auto* linux_sandbox = sandbox::policy::SandboxLinux::GetInstance();
+@@ -240,6 +247,9 @@ bool ZygoteMain(
+
+ // This function call can return multiple times, once per fork().
+ return zygote.ProcessRequests();
++#else
++ return false;
++#endif // !defined(OS_BSD)
+ }
+
+ } // namespace content