[tor-commits] [sandboxed-tor-browser/master] Bug 22853: Something in Ubuntu's libraries is totally brain damaged.

yawning at torproject.org yawning at torproject.org
Fri Jul 7 15:52:36 UTC 2017


commit f3ab9d888beffe2d567fb7d9a0385148a6ef9517
Author: Yawning Angel <yawning at schwanenlied.me>
Date:   Fri Jul 7 15:51:35 2017 +0000

    Bug 22853: Something in Ubuntu's libraries is totally brain damaged.
    
    Work around mass stupidity observed on Ubuntu.
---
 ChangeLog                                                     | 1 +
 src/cmd/sandboxed-tor-browser/internal/sandbox/application.go | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 8cd3858..3c95c7c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 Changes in version 0.0.10 - UNRELEASED:
  * Bug 22829: Remove default obfs4 bridge riemann.
+ * Bug 22853: Something in Ubuntu's libraries is totally brain damaged.
 
 Changes in version 0.0.9 - 2017-07-03:
  * Bug 22712: Suppress ATK Bridge initialization which will never work.
diff --git a/src/cmd/sandboxed-tor-browser/internal/sandbox/application.go b/src/cmd/sandboxed-tor-browser/internal/sandbox/application.go
index a160b67..5bc9ace 100644
--- a/src/cmd/sandboxed-tor-browser/internal/sandbox/application.go
+++ b/src/cmd/sandboxed-tor-browser/internal/sandbox/application.go
@@ -71,6 +71,12 @@ func RunTorBrowser(cfg *config.Config, manif *config.Manifest, tor *tor.Tor) (pr
 	h.fakeDbus = true
 	h.mountProc = false
 
+	// Dear Ubuntu.  While I realize that this may be a hard concept to grasp,
+	// if `openat()` returns -1 (ENOENT), the correct thing to do is NOT spin
+	// endlessly calling `read()` in a tight loop (ignoring the -1/EBADFD)
+	// status.
+	h.file("/proc/self/environ", []byte{})
+
 	// Gtk+ and PulseAudio.
 	hasAdwaita := h.appendGtk2Theme()
 	h.roBind("/usr/share/icons/hicolor", "/usr/share/icons/hicolor", true)



More information about the tor-commits mailing list