While testing the upcoming 6.5a3 builds I got greeted with
Sep 20 16:28:18.534 [warn] Unix socket path '"/home/thomas/Arbeit/Tor/tor-browser-bundle/gitian/tor-browser_en-US/Browser/TorBrowser/Data/Tor/control.socket"' is too long to fit.Sep 20 16:28:18.534 [warn] Failed to parse/validate config: Failed to bind one of the listener ports.
And Tor Browser failed to start. Moving both the 6.5a3 and the 6.5a3-hardened bundle into my home dir solved the problem
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
Should we be placing the sockets in /tmp instead of in the tor data directory? I think we would need to create a subdirectory with sufficiently restrictive permissions (tor does some permission checks).
Please use $XDG_RUNTIME_DIR if it's set:
https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.7.html
"The directory MUST be owned by the user, and he MUST be the only one having read and write access to it. Its Unix access mode MUST be 0700."
It tends to be something short like "/run/user/1000".
Thank you for that suggestion. Here is a proposal for the control and SOCKS port Unix domain socket paths:
The socket basenames will always be control.socket and socks.socket.
If $XDG_RUNTIME_DIR is set, create a unique subdirectory within that directory and place the sockets there (this will allow more than one copy of Tor Browser to be used at the same time). Tor Launcher will use Mozilla's nsIFile.createUnique() function to create the subdirectory and it will be deleted during browser exit.
If the length of the path <tor-data-dir>/control.socket is shorter than 100 bytes, use <tor-data-dir>/control.socket and <tor-data-dir>/socks.socket (compatible with TB 6.5a3's behavior).
Otherwise, create a unique directory within /tmp (similar to the $XDG_RUNTIME_DIR scenario).
That looks fine, and I like that you'll be able to run multiple copies.
Maybe you want the length check on $XDG_RUNTIME_DIR too, because the failure is non-obvious and the specification doesn't give any explicit length limit (the statement "on Unix-like operating systems AF_UNIX sockets...must be supported" implies a maximum length of 106 if connectat/bindat don't exist).
I think I don't understand why _createUniquIPCDir() would return null if the destination would be too long (at least after reading the .idl file I am still wondering). Could you elaborate?
I think I don't understand why _createUniquIPCDir() would return null if the destination would be too long (at least after reading the .idl file I am still wondering). Could you elaborate?
Our patch does not rely on _createUniquIPCDir() to do any length checking; that is done by _isIPCPathLengthOK(). Are you concerned about the fact that we do not check the path length in the /tmp/Tor case? Our assumption is that such a path will not be too long (and we have no additional options).
I think I don't understand why _createUniquIPCDir() would return null if the destination would be too long (at least after reading the .idl file I am still wondering). Could you elaborate?
Our patch does not rely on _createUniquIPCDir() to do any length checking; that is done by _isIPCPathLengthOK(). Are you concerned about the fact that we do not check the path length in the /tmp/Tor case? Our assumption is that such a path will not be too long (and we have no additional options).
I am just confused about the comment above this function because I somehow fail to see how null gets returned if the destination would be too long.
Thanks! Looks good to me now and merged to master and maint-0.2.10 (commit 4dd8f6130f931616cf014e0ded444c30e04c8bad and c916965ec2fe0b29c30414bb3c0ce3bf6ca207c5).
Trac: Resolution: N/Ato fixed Status: needs_review to closed