summaryrefslogtreecommitdiff
path: root/libre/iceweasel/0002-Bug-1660901-Support-the-fstat-like-subset-of-fstatat.patch
diff options
context:
space:
mode:
authorgrizzlyuser <grizzlyuser@protonmail.com>2020-09-27 17:38:54 +0300
committerbill-auger <mr.j.spam.me@gmail.com>2020-10-12 16:59:20 -0400
commit2fce21447fd2b874ef9fb0f00ddb21e397496269 (patch)
treee62d50e21293f078fea419f149fd7e4987405fbf /libre/iceweasel/0002-Bug-1660901-Support-the-fstat-like-subset-of-fstatat.patch
parent673f6aa0ff609f848c4dbe7924e9e11a951bf31f (diff)
downloadabslibre-2fce21447fd2b874ef9fb0f00ddb21e397496269.tar.gz
abslibre-2fce21447fd2b874ef9fb0f00ddb21e397496269.tar.bz2
abslibre-2fce21447fd2b874ef9fb0f00ddb21e397496269.zip
libre/iceweasel: Update to 81.0-2.parabola1
Setting MOZ_APP_NAME is necessary now because paths to binaries will contain 'firefox' not 'iceweasel' due to changes in this release of upstream Firefox.
Diffstat (limited to 'libre/iceweasel/0002-Bug-1660901-Support-the-fstat-like-subset-of-fstatat.patch')
-rw-r--r--libre/iceweasel/0002-Bug-1660901-Support-the-fstat-like-subset-of-fstatat.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/libre/iceweasel/0002-Bug-1660901-Support-the-fstat-like-subset-of-fstatat.patch b/libre/iceweasel/0002-Bug-1660901-Support-the-fstat-like-subset-of-fstatat.patch
new file mode 100644
index 000000000..427dfcdc1
--- /dev/null
+++ b/libre/iceweasel/0002-Bug-1660901-Support-the-fstat-like-subset-of-fstatat.patch
@@ -0,0 +1,46 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jed Davis <jld@mozilla.com>
+Date: Fri, 28 Aug 2020 09:23:58 +0000
+Subject: [PATCH] Bug 1660901 - Support the fstat-like subset of fstatat in the
+ Linux sandbox policies. r=gcp
+
+Differential Revision: https://phabricator.services.mozilla.com/D88499
+---
+ security/sandbox/linux/SandboxFilter.cpp | 6 ++++++
+ security/sandbox/linux/broker/SandboxBrokerUtils.h | 2 ++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/security/sandbox/linux/SandboxFilter.cpp b/security/sandbox/linux/SandboxFilter.cpp
+index e522d61e065c..4087bdc07e01 100644
+--- a/security/sandbox/linux/SandboxFilter.cpp
++++ b/security/sandbox/linux/SandboxFilter.cpp
+@@ -243,6 +243,12 @@ class SandboxPolicyCommon : public SandboxPolicyBase {
+ auto path = reinterpret_cast<const char*>(aArgs.args[1]);
+ auto buf = reinterpret_cast<statstruct*>(aArgs.args[2]);
+ auto flags = static_cast<int>(aArgs.args[3]);
++
++ if (fd != AT_FDCWD && (flags & AT_EMPTY_PATH) != 0 &&
++ strcmp(path, "") == 0) {
++ return ConvertError(fstatsyscall(fd, buf));
++ }
++
+ if (fd != AT_FDCWD && path[0] != '/') {
+ SANDBOX_LOG_ERROR("unsupported fd-relative fstatat(%d, \"%s\", %p, %d)",
+ fd, path, buf, flags);
+diff --git a/security/sandbox/linux/broker/SandboxBrokerUtils.h b/security/sandbox/linux/broker/SandboxBrokerUtils.h
+index 85a006740c2c..db33b5028e77 100644
+--- a/security/sandbox/linux/broker/SandboxBrokerUtils.h
++++ b/security/sandbox/linux/broker/SandboxBrokerUtils.h
+@@ -19,10 +19,12 @@
+ typedef struct stat64 statstruct;
+ # define statsyscall stat64
+ # define lstatsyscall lstat64
++# define fstatsyscall fstat64
+ #elif defined(__NR_stat)
+ typedef struct stat statstruct;
+ # define statsyscall stat
+ # define lstatsyscall lstat
++# define fstatsyscall fstat
+ #else
+ # error Missing stat syscall include.
+ #endif