[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser/tor-browser-52.3.0esr-7.5-2] Bug 1374281. r=jld



commit 722a1a652291a27657ed1a0b7eefd134519daa8f
Author: Gian-Carlo Pascutto <gcp@xxxxxxxxxxx>
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;
 }
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits