[tor-commits] [tor-browser-build/master] Bug 31968: Don't fail if /proc/cpuinfo is not readable

gk at torproject.org gk at torproject.org
Wed Oct 9 07:04:50 UTC 2019


commit 6cf4e6eabc5eb559baf9721a3caf0544b7480093
Author: Nicolas Vigier <boklm at torproject.org>
Date:   Tue Oct 8 20:10:48 2019 +0200

    Bug 31968: Don't fail if /proc/cpuinfo is not readable
    
    We use /proc/cpuinfo to check for SSE2 support, however on some systems
    it isn't readable by ordinary users, so we just assume that SSE2 is
    available in this case.
---
 projects/tor-browser/RelativeLink/start-tor-browser | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/projects/tor-browser/RelativeLink/start-tor-browser b/projects/tor-browser/RelativeLink/start-tor-browser
index 1adad8f..9356d4c 100755
--- a/projects/tor-browser/RelativeLink/start-tor-browser
+++ b/projects/tor-browser/RelativeLink/start-tor-browser
@@ -96,7 +96,7 @@ if [ "`id -u`" -eq 0 ]; then
 	exit 1
 fi
 
-if ! grep -q '^flags\s*:.* sse2' /proc/cpuinfo; then
+if test -r /proc/cpuinfo && ! grep -q '^flags\s*:.* sse2' /proc/cpuinfo; then
         complain "Tor Browser requires a CPU with SSE2 support.  Exiting."
         exit 1
 fi



More information about the tor-commits mailing list