summaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-base_posix_unix__domain__socket.cc
diff options
context:
space:
mode:
authorRene Ladan <rene@FreeBSD.org>2018-02-20 18:51:06 +0000
committerRene Ladan <rene@FreeBSD.org>2018-02-20 18:51:06 +0000
commit2312775f8ebc90aa20f4e45bd252816e24314844 (patch)
tree34414a0b8d8a904cd0eb4023b41603862897f7c9 /www/chromium/files/patch-base_posix_unix__domain__socket.cc
parentUpdate to 0.9704. (diff)
www/chromium: update to 63.0.3239.132
Submitted by: cpm Obtained from: https://github.com/cpu82/freebsd-chromium MFH: 2018Q1 Security: https://vuxml.freebsd.org/freebsd/e264e74e-ffe0-11e7-8b91-e8e0b747a45a.html Security: https://vuxml.freebsd.org/freebsd/1d951e85-ffdb-11e7-8b91-e8e0b747a45a.html Security: https://vuxml.freebsd.org/freebsd/82894193-ffd4-11e7-8b91-e8e0b747a45a.html Security: https://vuxml.freebsd.org/freebsd/f8e72cd4-c66a-11e7-bb17-e8e0b747a45a.html Security: https://vuxml.freebsd.org/freebsd/3cd46257-bbc5-11e7-a3bc-e8e0b747a45a.html Security: https://vuxml.freebsd.org/freebsd/a692bffe-b6ad-11e7-a1c2-e8e0b747a45a.html
Diffstat (limited to 'www/chromium/files/patch-base_posix_unix__domain__socket.cc')
-rw-r--r--www/chromium/files/patch-base_posix_unix__domain__socket.cc49
1 files changed, 49 insertions, 0 deletions
diff --git a/www/chromium/files/patch-base_posix_unix__domain__socket.cc b/www/chromium/files/patch-base_posix_unix__domain__socket.cc
new file mode 100644
index 000000000000..31324d592776
--- /dev/null
+++ b/www/chromium/files/patch-base_posix_unix__domain__socket.cc
@@ -0,0 +1,49 @@
+--- base/posix/unix_domain_socket.cc.orig 2018-01-04 21:05:38.000000000 +0100
++++ base/posix/unix_domain_socket.cc 2018-01-06 12:44:56.681201000 +0100
+@@ -5,7 +5,10 @@
+ #include "base/posix/unix_domain_socket.h"
+
+ #include <errno.h>
++#include <sys/param.h>
+ #include <sys/socket.h>
++#include <sys/types.h>
++#include <sys/ucred.h>
+ #if !defined(OS_NACL_NONSFI)
+ #include <sys/un.h>
+ #endif
+@@ -28,6 +31,14 @@
+
+ const size_t UnixDomainSocket::kMaxFileDescriptors = 16;
+
++#ifndef SCM_CREDENTIALS
++# define SCM_CREDENTIALS 0x9001
++#endif
++
++#ifndef SO_PASSCRED
++# define SO_PASSCRED 0x9002
++#endif
++
+ #if !defined(OS_NACL_NONSFI)
+ bool CreateSocketPair(ScopedFD* one, ScopedFD* two) {
+ int raw_socks[2];
+@@ -150,7 +161,7 @@
+ #if !defined(OS_NACL_NONSFI) && !defined(OS_MACOSX)
+ // The PNaCl toolchain for Non-SFI binary build and macOS do not support
+ // ucred. macOS supports xucred, but this structure is insufficient.
+- + CMSG_SPACE(sizeof(struct ucred))
++ + CMSG_SPACE(sizeof(struct cmsgcred))
+ #endif // OS_NACL_NONSFI or OS_MACOSX
+ ;
+ char control_buffer[kControlBufferSize];
+@@ -180,9 +191,9 @@
+ // SCM_CREDENTIALS.
+ if (cmsg->cmsg_level == SOL_SOCKET &&
+ cmsg->cmsg_type == SCM_CREDENTIALS) {
+- DCHECK_EQ(payload_len, sizeof(struct ucred));
++ DCHECK_EQ(payload_len, sizeof(struct cmsgcred));
+ DCHECK_EQ(pid, -1);
+- pid = reinterpret_cast<struct ucred*>(CMSG_DATA(cmsg))->pid;
++ pid = getpid();
+ }
+ #endif // !defined(OS_NACL_NONSFI) && !defined(OS_MACOSX)
+ }