[tor-commits] [tor-browser/tor-browser-52.4.0esr-7.0-1] Bug 1374281. r=jld

gk at torproject.org gk at torproject.org
Tue Oct 17 12:12:39 UTC 2017


commit 74a7688a81cb539e02431fff6dea8ee204b6ff80
Author: Gian-Carlo Pascutto <gcp at mozilla.com>
Date:   Mon Jun 19 20:07:38 2017 +0200

    Bug 1374281. r=jld
    
    MozReview-Commit-ID: Ko5m5i4Wkd6
    
    --HG--
    extra : rebase_source : 3076315ef3639a89f752addbb01d5d08a9c2db75
---
 security/sandbox/linux/broker/SandboxBroker.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/security/sandbox/linux/broker/SandboxBroker.cpp b/security/sandbox/linux/broker/SandboxBroker.cpp
index a31d1fc6684a..d79656c3407f 100644
--- a/security/sandbox/linux/broker/SandboxBroker.cpp
+++ b/security/sandbox/linux/broker/SandboxBroker.cpp
@@ -360,6 +360,10 @@ AllowOpen(int aReqFlags, int aPerms)
   if (aReqFlags & O_CREAT) {
     needed |= SandboxBroker::MAY_CREATE;
   }
+  // Linux allows O_TRUNC even with O_RDONLY
+  if (aReqFlags & O_TRUNC) {
+    needed |= SandboxBroker::MAY_WRITE;
+  }
   return (aPerms & needed) == needed;
 }
 





More information about the tor-commits mailing list