lists.torproject.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

tbb-commits

Thread Start a new thread
Threads by month
  • ----- 2026 -----
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
tbb-commits@lists.torproject.org

  • 1 participants
  • 20789 discussions
[tor-launcher/master] Bug 20185: Avoid using Unix domain socket paths that are too long
by gk@torproject.org 27 Oct '16

27 Oct '16
commit 4dd8f6130f931616cf014e0ded444c30e04c8bad Author: Kathy Brade <brade(a)pearlcrescent.com> Date: Thu Oct 27 12:02:57 2016 -0400 Bug 20185: Avoid using Unix domain socket paths that are too long Enforce a maximum length of 100 for Unix domain socket paths. If $XDG_RUNTIME_DIR is set, create a unique subdirectory within that directory and place the control and SOCKS sockets there if the resulting paths will not be too long else if the length of <tor-data-dir>/control.socket is less than 100 characters, place both sockets under <tor-data-dir> (this is compatible with the Tor Browser 6.5a3 behavior) else create a unique subdirectory under /tmp and place the sockets there. The unique subdirectory that is created under $XDG_RUNTIME_DIR or /tmp will be named Tor if no such directory exists; otherwise, an integer suffix will be appended until a new, uniquely named directory is found such as /tmp/Tor-1. Also, when starting tor, only include a SocksPort argument if a Unix domain socket path or a host/port is available. --- src/components/tl-process.js | 30 +++-- src/modules/tl-util.jsm | 254 ++++++++++++++++++++++++++++++++++--------- 2 files changed, 223 insertions(+), 61 deletions(-) diff --git a/src/components/tl-process.js b/src/components/tl-process.js index 844aba1..de71d45 100644 --- a/src/components/tl-process.js +++ b/src/components/tl-process.js @@ -142,7 +142,11 @@ TorProcessService.prototype = this.mObsSvc.notifyObservers(null, "TorProcessExited", null); - if (!this.mIsQuitting) + if (this.mIsQuitting) + { + TorLauncherUtil.cleanupTempDirectories(); + } + else { this.mProtocolSvc.TorCleanupConnection(); @@ -395,15 +399,21 @@ TorProcessService.prototype = // a TCP port and an IPC port (e.g., a Unix domain socket). if (socksPortInfo) { - let socksPortArg = (socksPortInfo.ipcFile) - ? this._ipcPortArg(socksPortInfo.ipcFile) - : socksPortInfo.host + ':' + socksPortInfo.port; - let socksPortFlags = TorLauncherUtil.getCharPref( - "extensions.torlauncher.socks_port_flags"); - if (socksPortFlags) - socksPortArg += ' ' + socksPortFlags; - args.push("SocksPort"); - args.push(socksPortArg); + let socksPortArg; + if (socksPortInfo.ipcFile) + socksPortArg = this._ipcPortArg(socksPortInfo.ipcFile) + else if (socksPortInfo.host && (socksPortInfo.port != 0)) + socksPortArg = socksPortInfo.host + ':' + socksPortInfo.port; + + if (socksPortArg) + { + let socksPortFlags = TorLauncherUtil.getCharPref( + "extensions.torlauncher.socks_port_flags"); + if (socksPortFlags) + socksPortArg += ' ' + socksPortFlags; + args.push("SocksPort"); + args.push(socksPortArg); + } } var pid = this._getpid(); diff --git a/src/modules/tl-util.jsm b/src/modules/tl-util.jsm index a1256fd..2f8d14e 100644 --- a/src/modules/tl-util.jsm +++ b/src/modules/tl-util.jsm @@ -251,6 +251,14 @@ let TorLauncherUtil = // Public } catch (e) {} }, + clearUserPref: function(aPrefName) + { + try + { + TLUtilInternal.mPrefsSvc.clearUserPref(aPrefName); + } catch (e) {} + }, + // Currently, this returns a random permutation of an array, bridgeArray. // Later, we might want to change this function to weight based on the // bridges' bandwidths. @@ -397,22 +405,97 @@ let TorLauncherUtil = // Public if (!aTorFileType) return null; - let isRelativePath = true; + let torFile; // an nsIFile to be returned + let path; // a relative or absolute path that will determine torFile + + let isRelativePath = false; let isUserData = (aTorFileType != "tor") && (aTorFileType != "torrc-defaults"); let isControlIPC = ("control_ipc" == aTorFileType); let isSOCKSIPC = ("socks_ipc" == aTorFileType); let isIPC = isControlIPC || isSOCKSIPC; + let checkIPCPathLen = true; + + const kControlIPCFileName = "control.socket"; + const kSOCKSIPCFileName = "socks.socket"; + let extraIPCPathLen = (isSOCKSIPC) ? 2 : 0; + let ipcFileName; + if (isControlIPC) + ipcFileName = kControlIPCFileName; + else if (isSOCKSIPC) + ipcFileName = kSOCKSIPCFileName; + + // If this is the first request for an IPC path during this browser + // session, remove the old temporary directory. This helps to keep /tmp + // clean if the browser crashes or is killed. + let ipcDirPath; + if (isIPC && TLUtilInternal.mIsFirstIPCPathRequest) + { + this.cleanupTempDirectories(); + TLUtilInternal.mIsFirstIPCPathRequest = false; + } + else + { + // Retrieve path for IPC objects (it may have already been determined). + ipcDirPath = this.getCharPref(TLUtilInternal.kIPCDirPrefName); + } + + // First, check the _path preference for this file type. let prefName = "extensions.torlauncher." + aTorFileType + "_path"; - let path = this.getCharPref(prefName); + path = this.getCharPref(prefName); if (path) { let re = (this.isWindows) ? /^[A-Za-z]:\\/ : /^\//; isRelativePath = !re.test(path); + checkIPCPathLen = false; // always try to use path if provided in pref } - else + else if (isIPC) + { + if (ipcDirPath) + { + // We have already determined where IPC objects will be placed. + torFile = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile); + torFile.initWithPath(ipcDirPath); + torFile.append(ipcFileName); + checkIPCPathLen = false; // already checked. + } + else + { + // If XDG_RUNTIME_DIR is set, use it as the base directory for IPC + // objects (e.g., Unix domain sockets) -- assuming it is not too long. + let env = Cc["@mozilla.org/process/environment;1"] + .getService(Ci.nsIEnvironment); + if (env.exists("XDG_RUNTIME_DIR")) + { + let ipcDir = TLUtilInternal._createUniqueIPCDir( + env.get("XDG_RUNTIME_DIR")); + if (ipcDir) + { + let f = ipcDir.clone(); + f.append(ipcFileName); + if (TLUtilInternal._isIPCPathLengthOK(f.path, extraIPCPathLen)) + { + torFile = f; + checkIPCPathLen = false; // no need to check again. + + // Store directory path so it can be reused for other IPC objects + // and so it can be removed during exit. + this.setCharPref(TLUtilInternal.kIPCDirPrefName, ipcDir.path); + } + else + { + // too long; remove the directory that we just created. + ipcDir.remove(false); + } + } + } + } + } + + if (!path && !torFile) { - // Get default path. + // No preference and no pre-determined IPC path: use a default path. + isRelativePath = true; if (TLUtilInternal._isUserDataOutsideOfAppDir) { // This block is used for the TorBrowser-Data/ case. @@ -437,10 +520,8 @@ let TorLauncherUtil = // Public path = "Tor/torrc"; else if ("tordatadir" == aTorFileType) path = "Tor"; - else if (isControlIPC) - path = "Tor/control.socket"; - else if (isSOCKSIPC) - path = "Tor/socks.socket"; + else if (isIPC) + path = "Tor/" + ipcFileName; } else // Linux and others. { @@ -452,10 +533,8 @@ let TorLauncherUtil = // Public path = "Tor/torrc"; else if ("tordatadir" == aTorFileType) path = "Tor"; - else if (isControlIPC) - path = "Tor/control.socket"; - else if (isSOCKSIPC) - path = "Tor/socks.socket"; + else if (isIPC) + path = "Tor/" + ipcFileName; } } else if (this.isWindows) @@ -481,67 +560,90 @@ let TorLauncherUtil = // Public path = "Data/Tor/torrc"; else if ("tordatadir" == aTorFileType) path = "Data/Tor"; - else if (isControlIPC) - path = "Data/Tor/control.socket"; - else if (isSOCKSIPC) - path = "Data/Tor/socks.socket"; + else if (isIPC) + path = "Data/Tor/" + ipcFileName; } - } - if (!path) - return null; + if (!path) + return null; + } try { - let f; - if (isRelativePath) + if (path) { - // Turn 'path' into an absolute path. - if (TLUtilInternal._isUserDataOutsideOfAppDir) + if (isRelativePath) { - let baseDir = isUserData ? TLUtilInternal._dataDir - : TLUtilInternal._appDir; - f = baseDir.clone(); + // Turn 'path' into an absolute path. + if (TLUtilInternal._isUserDataOutsideOfAppDir) + { + let baseDir = isUserData ? TLUtilInternal._dataDir + : TLUtilInternal._appDir; + torFile = baseDir.clone(); + } + else + { + torFile = TLUtilInternal._appDir.clone(); + torFile.append("TorBrowser"); + } + torFile.appendRelativePath(path); } else { - f = TLUtilInternal._appDir.clone(); - f.append("TorBrowser"); + torFile = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile); + torFile.initWithPath(path); } - f.appendRelativePath(path); - } - else - { - f = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile); - f.initWithPath(path); - } - if (!f.exists() && !isIPC && aCreate) - { - try - { - if ("tordatadir" == aTorFileType) - f.create(f.DIRECTORY_TYPE, 0700); - else - f.create(f.NORMAL_FILE_TYPE, 0600); - } - catch (e) + if (!torFile.exists() && !isIPC && aCreate) { - TorLauncherLogger.safelog(4, "unable to create " + f.path + ": ", e); - return null; + try + { + if ("tordatadir" == aTorFileType) + torFile.create(torFile.DIRECTORY_TYPE, 0700); + else + torFile.create(torFile.NORMAL_FILE_TYPE, 0600); + } + catch (e) + { + TorLauncherLogger.safelog(4, + "unable to create " + torFile.path + ": ", e); + return null; + } } } // If the file exists or an IPC object was requested, normalize the path // and return a file object. The control and SOCKS IPC objects will be // created by tor. - if (f.exists() || isIPC) + if (torFile.exists() || isIPC) { - try { f.normalize(); } catch(e) {} - return f; + try { torFile.normalize(); } catch(e) {} + + // Ensure that the IPC path length is short enough for use by the + // operating system. If not, create and use a unique directory under + // /tmp for all IPC objects. The created directory path is stored in + // a preference so it can be reused for other IPC objects and so it + // can be removed during exit. + if (isIPC && checkIPCPathLen && + !TLUtilInternal._isIPCPathLengthOK(torFile.path, extraIPCPathLen)) + { + torFile = TLUtilInternal._createUniqueIPCDir("/tmp"); + if (!torFile) + { + TorLauncherLogger.log(4, + "failed to create unique directory under /tmp"); + return null; + } + + this.setCharPref(TLUtilInternal.kIPCDirPrefName, torFile.path); + torFile.append(ipcFileName); + } + + return torFile; } - TorLauncherLogger.log(4, aTorFileType + " file not found: " + f.path); + TorLauncherLogger.log(4, aTorFileType + " file not found: " + + torFile.path); } catch(e) { @@ -551,6 +653,22 @@ let TorLauncherUtil = // Public return null; // File not found or error (logged above). }, // getTorFile() + + cleanupTempDirectories: function() + { + try + { + let dirPath = this.getCharPref(TLUtilInternal.kIPCDirPrefName); + this.clearUserPref(TLUtilInternal.kIPCDirPrefName); + if (dirPath) + { + let f = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile); + f.initWithPath(dirPath); + if (f.exists()) + f.remove(false); // Remove directory if it is empty + } + } catch(e) {} + }, }; @@ -561,6 +679,7 @@ let TLUtilInternal = // Private { kThunderbirdID: "{3550f703-e582-4d05-9a08-453d09bdfdc6}", kInstantbirdID: "{33cb9019-c295-46dd-be21-8c4936574bee}", + kIPCDirPrefName: "extensions.torlauncher.tmp_ipc_dir", mPrefsSvc : null, mStringBundle : null, @@ -570,6 +689,7 @@ let TLUtilInternal = // Private // this._isUserDataOutsideOfAppDir) mAppDir: null, // nsIFile (cached; access via this._appDir) mDataDir: null, // nsIFile (cached; access via this._dataDir) + mIsFirstIPCPathRequest : true, _init: function() { @@ -682,6 +802,38 @@ let TLUtilInternal = // Private return this.mDataDir; }, // get _dataDir + // Return true if aPath is short enough to be used as an IPC object path, + // e.g., for a Unix domain socket path. aExtraLen is the "delta" necessary + // to accommodate other IPC objects that have longer names; it is used to + // account for "control.socket" vs. "socks.socket" (we want to ensure that + // all IPC objects are placed in the same parent directory unless the user + // has set prefs or env vars to explicitly specify the path for an object). + // We enforce a maximum length of 100 because all operating systems allow + // at least 100 characters for Unix domain socket paths. + _isIPCPathLengthOK: function(aPath, aExtraLen) + { + const kMaxIPCPathLen = 100; + return aPath && ((aPath.length + aExtraLen) <= kMaxIPCPathLen); + }, + + // Returns an nsIFile or null if a unique directory could not be created. + _createUniqueIPCDir: function(aBasePath) + { + try + { + let d = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile); + d.initWithPath(aBasePath); + d.append("Tor"); + d.createUnique(Ci.nsIFile.DIRECTORY_TYPE, 0700); + return d; + } + catch (e) + { + TorLauncherLogger.safelog(4, "_createUniqueIPCDir failed for " + + aBasePath + ": ", e); + return null; + } + }, };
1 0
0 0
[tor-launcher/maint-0.2.10] Bug 20429: Do not open progress window if TOR_SKIP_LAUNCH=1
by gk@torproject.org 27 Oct '16

27 Oct '16
commit 8aa78d3a78bbabe01759b63d837b09acdf53be42 Author: Kathy Brade <brade(a)pearlcrescent.com> Date: Wed Oct 26 15:00:06 2016 -0400 Bug 20429: Do not open progress window if TOR_SKIP_LAUNCH=1 After saving tor settings, if TOR_SKIP_LAUNCH=1 or if extensions.torlauncher.start_tor is false, avoid opening the progress dialog to monitor bootstrap progress. This avoids displaying a progress window that will not make progress (and the situation was made worse by the fact that clicking Cancel set DisableNetwork=1). Also, leave the network settings dialog open if we fail to set DisableNetwork=0. --- src/chrome/content/network-settings.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/chrome/content/network-settings.js b/src/chrome/content/network-settings.js index 2736f08..dc54445 100644 --- a/src/chrome/content/network-settings.js +++ b/src/chrome/content/network-settings.js @@ -1055,11 +1055,22 @@ function useSettings() { var settings = {}; settings[kTorConfKeyDisableNetwork] = false; - setConfAndReportErrors(settings, null); + let didApply = setConfAndReportErrors(settings, null); + if (!didApply) + return; gProtocolSvc.TorSendCommand("SAVECONF"); gTorProcessService.TorClearBootstrapError(); + // If we are not responsible for starting tor we do not monitor bootstrap + // status, so just close this dialog and return rather than opening the + // progress dialog (which will make no progress). + if (!TorLauncherUtil.shouldStartAndOwnTor) + { + close(); + return; + } + gIsBootstrapComplete = gTorProcessService.TorIsBootstrapDone; if (!gIsBootstrapComplete) openProgressDialog();
1 0
0 0
[tor-launcher/maint-0.2.9] Bug 20429: Do not open progress window if TOR_SKIP_LAUNCH=1
by gk@torproject.org 27 Oct '16

27 Oct '16
commit 2014143e0081170267a34e3a102878999dee6a29 Author: Kathy Brade <brade(a)pearlcrescent.com> Date: Wed Oct 26 15:00:06 2016 -0400 Bug 20429: Do not open progress window if TOR_SKIP_LAUNCH=1 After saving tor settings, if TOR_SKIP_LAUNCH=1 or if extensions.torlauncher.start_tor is false, avoid opening the progress dialog to monitor bootstrap progress. This avoids displaying a progress window that will not make progress (and the situation was made worse by the fact that clicking Cancel set DisableNetwork=1). Also, leave the network settings dialog open if we fail to set DisableNetwork=0. --- src/chrome/content/network-settings.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/chrome/content/network-settings.js b/src/chrome/content/network-settings.js index 2736f08..dc54445 100644 --- a/src/chrome/content/network-settings.js +++ b/src/chrome/content/network-settings.js @@ -1055,11 +1055,22 @@ function useSettings() { var settings = {}; settings[kTorConfKeyDisableNetwork] = false; - setConfAndReportErrors(settings, null); + let didApply = setConfAndReportErrors(settings, null); + if (!didApply) + return; gProtocolSvc.TorSendCommand("SAVECONF"); gTorProcessService.TorClearBootstrapError(); + // If we are not responsible for starting tor we do not monitor bootstrap + // status, so just close this dialog and return rather than opening the + // progress dialog (which will make no progress). + if (!TorLauncherUtil.shouldStartAndOwnTor) + { + close(); + return; + } + gIsBootstrapComplete = gTorProcessService.TorIsBootstrapDone; if (!gIsBootstrapComplete) openProgressDialog();
1 0
0 0
[tor-launcher/master] Bug 20429: Do not open progress window if TOR_SKIP_LAUNCH=1
by gk@torproject.org 27 Oct '16

27 Oct '16
commit c12d56470b7164c33b3cb2e48a90dc65151a9a26 Author: Kathy Brade <brade(a)pearlcrescent.com> Date: Wed Oct 26 15:00:06 2016 -0400 Bug 20429: Do not open progress window if TOR_SKIP_LAUNCH=1 After saving tor settings, if TOR_SKIP_LAUNCH=1 or if extensions.torlauncher.start_tor is false, avoid opening the progress dialog to monitor bootstrap progress. This avoids displaying a progress window that will not make progress (and the situation was made worse by the fact that clicking Cancel set DisableNetwork=1). Also, leave the network settings dialog open if we fail to set DisableNetwork=0. --- src/chrome/content/network-settings.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/chrome/content/network-settings.js b/src/chrome/content/network-settings.js index e0d7d1c..5df4e1e 100644 --- a/src/chrome/content/network-settings.js +++ b/src/chrome/content/network-settings.js @@ -1209,11 +1209,22 @@ function useSettings() { var settings = {}; settings[kTorConfKeyDisableNetwork] = false; - setConfAndReportErrors(settings, null); + let didApply = setConfAndReportErrors(settings, null); + if (!didApply) + return; gProtocolSvc.TorSendCommand("SAVECONF"); gTorProcessService.TorClearBootstrapError(); + // If we are not responsible for starting tor we do not monitor bootstrap + // status, so just close this dialog and return rather than opening the + // progress dialog (which will make no progress). + if (!TorLauncherUtil.shouldStartAndOwnTor) + { + close(); + return; + } + gIsBootstrapComplete = gTorProcessService.TorIsBootstrapDone; if (!gIsBootstrapComplete) openProgressDialog();
1 0
0 0
[tor-browser/tor-browser-45.4.0esr-6.0-1] fixup! Bug 1070710 - Add mozilla::ViewRegion which assembles a LayoutDeviceIntRegion as NSViews. r=spohl
by gk@torproject.org 26 Oct '16

26 Oct '16
commit 41f1c54ad978155f964fca1100f0c2eda1bef88a Author: Kathy Brade <brade(a)pearlcrescent.com> Date: Tue Oct 25 23:01:20 2016 -0400 fixup! Bug 1070710 - Add mozilla::ViewRegion which assembles a LayoutDeviceIntRegion as NSViews. r=spohl OSX: Fix a problem where clicking and dragging in the content area of a window would sometimes cause the window to move. This is a fixup for an error introduced while backporting a Mozilla patch for Tor bug 20204. --- widget/cocoa/ViewRegion.mm | 1 - 1 file changed, 1 deletion(-) diff --git a/widget/cocoa/ViewRegion.mm b/widget/cocoa/ViewRegion.mm index 3459849..ee31889 100644 --- a/widget/cocoa/ViewRegion.mm +++ b/widget/cocoa/ViewRegion.mm @@ -56,7 +56,6 @@ ViewRegion::UpdateRegion(const LayoutDeviceIntRegion& aRegion, } [view setNeedsDisplay:YES]; mViews.AppendElement(view); - iter.Next(); } else { // Our new region is made of fewer rects than the old region, so we can // remove this view. We only have a weak reference to it, so removing it
1 0
0 0
[tor-browser/tor-browser-45.4.0esr-6.5-1] fixup! Bug 1070710 - Add mozilla::ViewRegion which assembles a LayoutDeviceIntRegion as NSViews. r=spohl
by gk@torproject.org 26 Oct '16

26 Oct '16
commit a6b4bb9a9d2769e8be110f2f0486b9ec74882575 Author: Kathy Brade <brade(a)pearlcrescent.com> Date: Tue Oct 25 23:01:20 2016 -0400 fixup! Bug 1070710 - Add mozilla::ViewRegion which assembles a LayoutDeviceIntRegion as NSViews. r=spohl OSX: Fix a problem where clicking and dragging in the content area of a window would sometimes cause the window to move. This is a fixup for an error introduced while backporting a Mozilla patch for Tor bug 20204. --- widget/cocoa/ViewRegion.mm | 1 - 1 file changed, 1 deletion(-) diff --git a/widget/cocoa/ViewRegion.mm b/widget/cocoa/ViewRegion.mm index 3459849..ee31889 100644 --- a/widget/cocoa/ViewRegion.mm +++ b/widget/cocoa/ViewRegion.mm @@ -56,7 +56,6 @@ ViewRegion::UpdateRegion(const LayoutDeviceIntRegion& aRegion, } [view setNeedsDisplay:YES]; mViews.AppendElement(view); - iter.Next(); } else { // Our new region is made of fewer rects than the old region, so we can // remove this view. We only have a weak reference to it, so removing it
1 0
0 0
[tor-browser/tor-browser-45.4.0esr-6.5-1] Bug 1311044 - show error when connection to domain socket is failed; r=bagder
by gk@torproject.org 25 Oct '16

25 Oct '16
commit b91682cd038d63eb2dbec1303c2ab9a65a43775b Author: Liang-Heng Chen <xeonchen(a)mozilla.com> Date: Wed Oct 19 18:28:02 2016 +0800 Bug 1311044 - show error when connection to domain socket is failed; r=bagder MozReview-Commit-ID: GtqKiMVwQyX --HG-- extra : rebase_source : 04e3b258f06e7d3e196c241c96aa3cc92ec334da --- netwerk/socket/nsSOCKSIOLayer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/netwerk/socket/nsSOCKSIOLayer.cpp b/netwerk/socket/nsSOCKSIOLayer.cpp index be69725..d20fe7f 100644 --- a/netwerk/socket/nsSOCKSIOLayer.cpp +++ b/netwerk/socket/nsSOCKSIOLayer.cpp @@ -515,10 +515,16 @@ nsSOCKSSocketInfo::ConnectToProxy(PRFileDesc *fd) status = fd->lower->methods->connect(fd->lower, &prProxy, mTimeout); if (status != PR_SUCCESS) { PRErrorCode c = PR_GetError(); + // If EINPROGRESS, return now and check back later after polling if (c == PR_WOULD_BLOCK_ERROR || c == PR_IN_PROGRESS_ERROR) { mState = SOCKS_CONNECTING_TO_PROXY; return status; + } else if (IsHostDomainSocket()) { + LOGERROR(("socks: connect to domain socket failed (%d)", c)); + PR_SetError(PR_CONNECT_REFUSED_ERROR, 0); + mState = SOCKS_FAILED; + return status; } } } while (status != PR_SUCCESS);
1 0
0 0
[tor-browser-bundle/master] Bug 20210: in dmg2mar, extract old mar file to copy permissions to the new one
by gk@torproject.org 21 Oct '16

21 Oct '16
commit 97acdebccac65377317068cdbfae6def9bb67309 Author: Nicolas Vigier <boklm(a)torproject.org> Date: Mon Oct 17 19:23:17 2016 +0200 Bug 20210: in dmg2mar, extract old mar file to copy permissions to the new one 7z does not currently extract file permissions from the dmg files so we also extract the old mar file to copy the permissions. --- tools/dmg2mar | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tools/dmg2mar b/tools/dmg2mar index 010761e..8eaebe8 100755 --- a/tools/dmg2mar +++ b/tools/dmg2mar @@ -31,6 +31,7 @@ use strict; use IO::CaptureOutput qw(capture_exec); use File::Slurp; +use File::Find; use Parallel::ForkManager; use Cwd; @@ -110,6 +111,27 @@ sub convert_files { my (undef, $err, $success) = capture_exec('7z', 'x', "-o$tmpdir", $file->{filename}); exit_error "Error extracting $file->{filename}: $err" unless $success; + + # 7z does not currently extract file permissions from the dmg files + # so we also extract the old mar file to copy the permissions + # https://trac.torproject.org/projects/tor/ticket/20210 + my $tmpdir_oldmar = File::Temp->newdir(); + my $oldmar = getcwd . '/' . $output; + exit_error "Error extracting $output" + unless system('mar', '-C', $tmpdir_oldmar, '-x', $oldmar) == 0; + my $wanted = sub { + my $file = $File::Find::name; + $file =~ s{^$tmpdir/TorBrowser\.app/}{}; + if (-f "$tmpdir_oldmar/$file") { + my (undef, undef, $mode) = stat("$tmpdir_oldmar/$file"); + chmod $mode, $File::Find::name; + return; + } + chmod 0644, $File::Find::name if -f $File::Find::name; + chmod 0755, $File::Find::name if -d $File::Find::name; + }; + find($wanted, "$tmpdir/TorBrowser.app"); + unlink $output; (undef, $err, $success) = capture_exec('make_full_update.sh', '-q', $output, "$tmpdir/TorBrowser.app");
1 0
0 0
[tor-browser-bundle/hardened-builds] Bug 20422: Fall back to SHA256 check for PyCrypto
by gk@torproject.org 21 Oct '16

21 Oct '16
commit 51f62d0c35e4c0587618f586fcfacae377933497 Author: Georg Koppen <gk(a)torproject.org> Date: Fri Oct 21 13:00:34 2016 +0000 Bug 20422: Fall back to SHA256 check for PyCrypto The subkey that signed PyCrypto back in the days expired. We fall back to the SHA256 check (which we already did in addition to the signature check). --- gitian/fetch-inputs.sh | 6 +++--- gitian/verify-tags.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gitian/fetch-inputs.sh b/gitian/fetch-inputs.sh index c663051..bbd2c88 100755 --- a/gitian/fetch-inputs.sh +++ b/gitian/fetch-inputs.sh @@ -113,11 +113,11 @@ update_git() { ############################################################################## # Get+verify sigs that exist -for i in OPENSSL BINUTILS GCC PYCRYPTO PYTHON_MSI GMP ELFUTILS +for i in OPENSSL BINUTILS GCC PYTHON_MSI GMP ELFUTILS do PACKAGE="${i}_PACKAGE" URL="${i}_URL" - if [ "${i}" == "PYCRYPTO" -o "${i}" == "PYTHON_MSI" -o "${i}" == "OPENSSL" ]; then + if [ "${i}" == "PYTHON_MSI" -o "${i}" == "OPENSSL" ]; then SUFFIX="asc" else SUFFIX="sig" @@ -162,7 +162,7 @@ do get "${!PACKAGE}" "${MIRROR_URL_ASN}${!PACKAGE}" done -for i in ZOPEINTERFACE TWISTED PY2EXE SETUPTOOLS PARSLEY GO14 GO STIXMATHFONT NOTOEMOJIFONT NOTOJPFONT NOTOKRFONT NOTOSCFONT NOTOTCFONT NSIS NSIS_DEBIAN +for i in ZOPEINTERFACE TWISTED PY2EXE SETUPTOOLS PARSLEY GO14 GO STIXMATHFONT NOTOEMOJIFONT NOTOJPFONT NOTOKRFONT NOTOSCFONT NOTOTCFONT NSIS NSIS_DEBIAN PYCRYPTO do URL="${i}_URL" PACKAGE="${i}_PACKAGE" diff --git a/gitian/verify-tags.sh b/gitian/verify-tags.sh index 8277fca..b7c45c4 100755 --- a/gitian/verify-tags.sh +++ b/gitian/verify-tags.sh @@ -123,11 +123,11 @@ selfrando $SELFRANDO_TAG EOF # Verify signatures on signed packages -for i in OPENSSL BINUTILS GCC PYCRYPTO PYTHON_MSI GMP ELFUTILS +for i in OPENSSL BINUTILS GCC PYTHON_MSI GMP ELFUTILS do PACKAGE="${i}_PACKAGE" URL="${i}_URL" - if [ "${i}" == "PYCRYPTO" -o "${i}" == "PYTHON_MSI" -o "${i}" == "OPENSSL" ]; then + if [ "${i}" == "PYTHON_MSI" -o "${i}" == "OPENSSL" ]; then SUFFIX="asc" else SUFFIX="sig"
1 0
0 0
[tor-browser-bundle/maint-6.0] Bug 20422: Fall back to SHA256 check for PyCrypto
by gk@torproject.org 21 Oct '16

21 Oct '16
commit bfc9d71a999e0902011684610a9dcfb97319ae10 Author: Georg Koppen <gk(a)torproject.org> Date: Fri Oct 21 13:00:34 2016 +0000 Bug 20422: Fall back to SHA256 check for PyCrypto The subkey that signed PyCrypto back in the days expired. We fall back to the SHA256 check (which we already did in addition to the signature check). --- gitian/fetch-inputs.sh | 6 +++--- gitian/verify-tags.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gitian/fetch-inputs.sh b/gitian/fetch-inputs.sh index 99b984b..b5adfc2 100755 --- a/gitian/fetch-inputs.sh +++ b/gitian/fetch-inputs.sh @@ -113,11 +113,11 @@ update_git() { ############################################################################## # Get+verify sigs that exist -for i in OPENSSL BINUTILS GCC PYCRYPTO PYTHON_MSI GMP +for i in OPENSSL BINUTILS GCC PYTHON_MSI GMP do PACKAGE="${i}_PACKAGE" URL="${i}_URL" - if [ "${i}" == "PYCRYPTO" -o "${i}" == "PYTHON_MSI" -o "${i}" == "OPENSSL" ]; then + if [ "${i}" == "PYTHON_MSI" -o "${i}" == "OPENSSL" ]; then SUFFIX="asc" else SUFFIX="sig" @@ -162,7 +162,7 @@ do get "${!PACKAGE}" "${MIRROR_URL_ASN}${!PACKAGE}" done -for i in ZOPEINTERFACE TWISTED PY2EXE SETUPTOOLS PARSLEY GO STIXMATHFONT NOTOEMOJIFONT NOTOJPFONT NOTOKRFONT NOTOSCFONT NOTOTCFONT NSIS NSIS_DEBIAN +for i in ZOPEINTERFACE TWISTED PY2EXE SETUPTOOLS PARSLEY GO STIXMATHFONT NOTOEMOJIFONT NOTOJPFONT NOTOKRFONT NOTOSCFONT NOTOTCFONT NSIS NSIS_DEBIAN PYCRYPTO do URL="${i}_URL" PACKAGE="${i}_PACKAGE" diff --git a/gitian/verify-tags.sh b/gitian/verify-tags.sh index e006fb0..33b54a4 100755 --- a/gitian/verify-tags.sh +++ b/gitian/verify-tags.sh @@ -125,11 +125,11 @@ noto-fonts $NOTOFONTS_TAG EOF # Verify signatures on signed packages -for i in OPENSSL BINUTILS GCC PYCRYPTO PYTHON_MSI GMP +for i in OPENSSL BINUTILS GCC PYTHON_MSI GMP do PACKAGE="${i}_PACKAGE" URL="${i}_URL" - if [ "${i}" == "PYCRYPTO" -o "${i}" == "PYTHON_MSI" -o "${i}" == "OPENSSL" ]; then + if [ "${i}" == "PYTHON_MSI" -o "${i}" == "OPENSSL" ]; then SUFFIX="asc" else SUFFIX="sig"
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 1846
  • 1847
  • 1848
  • 1849
  • 1850
  • 1851
  • 1852
  • ...
  • 2079
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.