Opened 6 months ago

#28892 new defect

Check for `file` command in Tor Browser start script before using it

Reported by: gk Owned by: tbb-team
Priority: Low Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

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.

Child Tickets

Change History (0)

Note: See TracTickets for help on using tickets.