electron/patches/common/chromium/thread_capabilities.patch
Milan Burda d56617e5d0 chore: avoid appending git version to the exported patches (#15389)
* chore: avoid appending git version to the exported patches

* fix no-eol at end of v8 patch
2018-10-26 12:52:59 +05:30

27 lines
970 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Anonymous <anonymous@electronjs.org>
Date: Thu, 20 Sep 2018 17:46:43 -0700
Subject: thread_capabilities.patch
Chromium automatically drops all capabilities of renderer threads in
Linux, which may cause issues in a context like Electron, where the main
and renderer threads are supposed to keep inherited permissions over the
system.
See https://github.com/atom/electron/issues/3666
diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc
index ad0714a7f5edad1784d5e055a392519f750973cc..1406e1d53f2f13bbbcc5b96a1681b9ec18c3e49c 100644
--- a/sandbox/linux/services/credentials.cc
+++ b/sandbox/linux/services/credentials.cc
@@ -348,8 +348,10 @@ pid_t Credentials::ForkAndDropCapabilitiesInChild() {
return pid;
}
+#if 0
// Since we just forked, we are single threaded.
PCHECK(DropAllCapabilitiesOnCurrentThread());
+#endif
return 0;
}