summaryrefslogtreecommitdiff
path: root/www/chromium-uc/patches/patch-content_zygote_zygote_main_linux_cc
diff options
context:
space:
mode:
Diffstat (limited to 'www/chromium-uc/patches/patch-content_zygote_zygote_main_linux_cc')
-rw-r--r--www/chromium-uc/patches/patch-content_zygote_zygote_main_linux_cc67
1 files changed, 0 insertions, 67 deletions
diff --git a/www/chromium-uc/patches/patch-content_zygote_zygote_main_linux_cc b/www/chromium-uc/patches/patch-content_zygote_zygote_main_linux_cc
deleted file mode 100644
index 8770b12..0000000
--- a/www/chromium-uc/patches/patch-content_zygote_zygote_main_linux_cc
+++ /dev/null
@@ -1,67 +0,0 @@
1$OpenBSD: patch-content_zygote_zygote_main_linux_cc,v 1.15 2021/01/20 07:28:10 robert Exp $
2
3Index: content/zygote/zygote_main_linux.cc
4--- content/zygote/zygote_main_linux.cc.orig
5+++ content/zygote/zygote_main_linux.cc
6@@ -11,7 +11,9 @@
7 #include <stddef.h>
8 #include <stdint.h>
9 #include <string.h>
10+#if !defined(OS_BSD)
11 #include <sys/prctl.h>
12+#endif
13 #include <sys/socket.h>
14 #include <sys/types.h>
15 #include <unistd.h>
16@@ -40,7 +42,9 @@
17 #include "sandbox/linux/services/thread_helpers.h"
18 #include "sandbox/linux/suid/client/setuid_sandbox_client.h"
19 #include "sandbox/policy/linux/sandbox_debug_handling_linux.h"
20+#if !defined(OS_BSD)
21 #include "sandbox/policy/linux/sandbox_linux.h"
22+#endif
23 #include "sandbox/policy/sandbox.h"
24 #include "sandbox/policy/switches.h"
25 #include "third_party/icu/source/i18n/unicode/timezone.h"
26@@ -49,6 +53,7 @@ namespace content {
27
28 namespace {
29
30+#if !defined(OS_BSD)
31 void CloseFds(const std::vector<int>& fds) {
32 for (const auto& it : fds) {
33 PCHECK(0 == IGNORE_EINTR(close(it)));
34@@ -66,9 +71,11 @@ base::OnceClosure ClosureFromTwoClosures(base::OnceClo
35 },
36 std::move(one), std::move(two));
37 }
38+#endif
39
40 } // namespace
41
42+#if !defined(OS_BSD)
43 // This function triggers the static and lazy construction of objects that need
44 // to be created before imposing the sandbox.
45 static void ZygotePreSandboxInit() {
46@@ -173,9 +180,11 @@ static void EnterLayerOneSandbox(sandbox::policy::Sand
47 CHECK(!using_layer1_sandbox);
48 }
49 }
50+#endif
51
52 bool ZygoteMain(
53 std::vector<std::unique_ptr<ZygoteForkDelegate>> fork_delegates) {
54+#if !defined(OS_BSD)
55 sandbox::SetAmZygoteOrRenderer(true, GetSandboxFD());
56
57 auto* linux_sandbox = sandbox::policy::SandboxLinux::GetInstance();
58@@ -240,6 +249,9 @@ bool ZygoteMain(
59
60 // This function call can return multiple times, once per fork().
61 return zygote.ProcessRequests();
62+#else
63+ return false;
64+#endif
65 }
66
67 } // namespace content