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

[tor-bugs] #28892 [Applications/Tor Browser]: Check for `file` command in Tor Browser start script before using it



#28892: Check for `file` command in Tor Browser start script before using it
------------------------------------------+----------------------
     Reporter:  gk                        |      Owner:  tbb-team
         Type:  defect                    |     Status:  new
     Priority:  Low                       |  Milestone:
    Component:  Applications/Tor Browser  |    Version:
     Severity:  Normal                    |   Keywords:
Actual Points:                            |  Parent ID:
       Points:                            |   Reviewer:
      Sponsor:                            |
------------------------------------------+----------------------
 In `start-tor-browser` we do
 {{{
 SYSARCHITECTURE=$(getconf LONG_BIT)
 TORARCHITECTURE=$(expr "$(file TorBrowser/Tor/tor)" : '.*ELF
 \([[:digit:]]*\)')

 if [ $SYSARCHITECTURE -ne $TORARCHITECTURE ]; then
    complain "Wrong architecture? 32-bit vs. 64-bit."
    exit 1
 fi
 }}}
 to bail out early in case users have downloaded a bundle for the wrong
 architecture. Now, it turns out that there are Linux distros out there
 (NixOS seems to be one of those) that don't find `file` that way. A fix
 for that would be to check for the existence of `file` and if we can't
 find it to note that we assume the user knows what they are doing and
 proceed anyway.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/28892>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs