[tor-commits] [tor/release-0.4.1] Changelog for 0.4.1.8

2020-01-29 Thread nickm
commit 84aa01aecb585fa6762be48b9c268e76835482f8
Author: Nick Mathewson 
Date:   Wed Jan 29 20:06:15 2020 -0500

Changelog for 0.4.1.8
---
 ChangeLog   | 43 +++
 changes/bug29819|  8 
 changes/bug32778|  3 ---
 changes/bug32841|  4 
 changes/ticket32240 |  4 
 changes/ticket32242 |  2 --
 changes/ticket32407 |  4 
 changes/ticket32629 |  4 
 8 files changed, 43 insertions(+), 29 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 463962e3b..c0eaf8c71 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,46 @@
+Changes in version 0.4.1.8 - 2019-01-3x
+  This release backports several bugfixes from later release series,
+  including some that had affected the Linux seccomp2 sandbox or Windows
+  services. If you're running with one of those configurations, you'll
+  probably want to upgrade; otherwise, you should be fine with your
+  current version of 0.4.1.x.
+
+  o Major bugfixes (linux seccomp sandbox, backport from 0.4.3.1-alpha):
+- Correct how we use libseccomp. Particularly, stop assuming that
+  rules are applied in a particular order or that more rules are
+  processed after the first match. Neither is the case! In
+  libseccomp <2.4.0 this lead to some rules having no effect.
+  libseccomp 2.4.0 changed how rules are generated, leading to a
+  different ordering, which in turn led to a fatal crash during
+  startup. Fixes bug 29819; bugfix on 0.2.5.1-alpha. Patch by
+  Peter Gerber.
+- Fix crash when reloading logging configuration while the
+  experimental sandbox is enabled. Fixes bug 32841; bugfix on
+  0.4.1.7. Patch by Peter Gerber.
+
+  o Minor bugfixes (crash, backport form 0.4.2.4-rc):
+- When running Tor with an option like --verify-config or
+  --dump-config that does not start the event loop, avoid crashing
+  if we try to exit early because of an error. Fixes bug 32407;
+  bugfix on 0.3.3.1-alpha.
+
+  o Minor bugfixes (windows service, backport from 0.4.3.1-alpha):
+- Initialize the publish/subscribe system when running as a windows
+  service. Fixes bug 32778; bugfix on 0.4.1.1-alpha.
+
+  o Testing (backport from 0.4.3.1-alpha):
+- Turn off Tor's Sandbox in Chutney jobs, and run those jobs on
+  Ubuntu Bionic. Turning off the Sandbox is a work-around, until we
+  fix the sandbox errors in 32722. Closes ticket 32240.
+- Re-enable the Travis CI macOS Chutney build, but don't let it
+  prevent the Travis job from finishing. (The Travis macOS jobs are
+  slow, so we don't want to have it delay the whole CI process.)
+  Closes ticket 32629.
+
+  o Testing (continuous integration, backport from 0.4.3.1-alpha):
+- Use zstd in our Travis Linux builds. Closes ticket 32242.
+
+
 Changes in version 0.4.1.7 - 2019-12-09
   This release backports several bugfixes to improve stability and
   correctness.  Anyone experiencing build problems or crashes with 0.4.1.6,
diff --git a/changes/bug29819 b/changes/bug29819
deleted file mode 100644
index d37ac83d6..0
--- a/changes/bug29819
+++ /dev/null
@@ -1,8 +0,0 @@
-  o Minor bugfixes (linux seccomp sandbox):
-- Correct how we use libseccomp. Particularly, stop assuming that
-  rules are applied in a particular order or that more rules are
-  processed after the first match. Neither is the case! In libseccomp
-  <2.4.0 this lead to some rules having no effect. Libseccomp 2.4.0
-  changed how rules are generated leading to a different ordering
-  which in turn lead to a fatal crash during startup. Fixes bug
-  29819; bugfix on 0.2.5.1-alpha. Patch by Peter Gerber.
diff --git a/changes/bug32778 b/changes/bug32778
deleted file mode 100644
index ccb610469..0
--- a/changes/bug32778
+++ /dev/null
@@ -1,3 +0,0 @@
-  o Minor bugfixes (windows service):
-- Initialize publish/subscribe system when running as a windows service.
-  Fixes bug 32778; bugfix on 0.4.1.1-alpha.
diff --git a/changes/bug32841 b/changes/bug32841
deleted file mode 100644
index 48568f6a6..0
--- a/changes/bug32841
+++ /dev/null
@@ -1,4 +0,0 @@
-  o Minor bugfixes (linux seccomp sandbox):
-- Fix crash when reloading logging configuration while the
-  experimental sandbox is enabled. Fixes bug 32841; bugfix
-  on 0.4.1.7. Patch by Peter Gerber.
diff --git a/changes/ticket32240 b/changes/ticket32240
deleted file mode 100644
index 35cc3df27..0
--- a/changes/ticket32240
+++ /dev/null
@@ -1,4 +0,0 @@
-  o Testing:
-- Turn off Tor's Sandbox in Chutney jobs, and run those jobs on Ubuntu
-  Bionic. Turning off the Sandbox is a work-around, until we fix the
-  sandbox errors in 32722. Closes ticket 32240.
diff --git a/changes/ticket32242 b/changes/ticket32242
deleted file mode 100644
index d63d5a586..0
--- a/changes/ticket32242
+++ /dev/null
@@ -1,2 +0,0 @@
-  o Testing (continuous integration):
-- Use zstd in our 

[tor-commits] [tor/release-0.4.2] start a changelog for 0.4.2.6

2020-01-29 Thread nickm
commit 60cd9f946c2155bd8231bc80d321ebaa98db0b49
Author: Nick Mathewson 
Date:   Wed Jan 29 19:55:07 2020 -0500

start a changelog for 0.4.2.6
---
 ChangeLog   | 51 +
 changes/bug29819|  8 ---
 changes/bug32771|  4 
 changes/bug32778|  3 ---
 changes/bug32841|  4 
 changes/ticket32240 |  4 
 changes/ticket32242 |  2 --
 changes/ticket32629 |  4 
 changes/ticket32705_disable |  7 ---
 changes/ticket32765 |  4 
 10 files changed, 51 insertions(+), 40 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2f7808078..9a4b0a678 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,54 @@
+Changes in version 0.4.2.6 - 2020-01-3x
+  This is the second stable release in the 0.4.2.x series.
+
+  o Major bugfixes (linux seccomp sandbox, backport from 0.4.3.1-alpha):
+- Correct how we use libseccomp. Particularly, stop assuming that
+  rules are applied in a particular order or that more rules are
+  processed after the first match. Neither is the case! In
+  libseccomp <2.4.0 this lead to some rules having no effect.
+  libseccomp 2.4.0 changed how rules are generated, leading to a
+  different ordering, which in turn led to a fatal crash during
+  startup. Fixes bug 29819; bugfix on 0.2.5.1-alpha. Patch by
+  Peter Gerber.
+- Fix crash when reloading logging configuration while the
+  experimental sandbox is enabled. Fixes bug 32841; bugfix on
+  0.4.1.7. Patch by Peter Gerber.
+
+  o Minor bugfixes (logging, crash, backport from 0.4.3.1-alpha):
+- Avoid a possible crash when trying to log a (fatal) assertion
+  failure about mismatched magic numbers in configuration objects.
+  Fixes bug 32771; bugfix on 0.4.2.1-alpha.
+
+  o Minor bugfixes (windows service, backport from 0.4.3.1-alpha):
+- Initialize the publish/subscribe system when running as a windows
+  service. Fixes bug 32778; bugfix on 0.4.1.1-alpha.
+
+  o Testing (backport from 0.4.3.1-alpha)
+- Turn off Tor's Sandbox in Chutney jobs, and run those jobs on
+  Ubuntu Bionic. Turning off the Sandbox is a work-around, until we
+  fix the sandbox errors in 32722. Closes ticket 32240.
+- Re-enable the Travis CI macOS Chutney build, but don't let it
+  prevent the Travis job from finishing. (The Travis macOS jobs are
+  slow, so we don't want to have it delay the whole CI process.)
+  Closes ticket 32629.
+
+  o Testing (continuous integration, backport from 0.4.3.1-alpha):
+- Use zstd in our Travis Linux builds. Closes ticket 32242.
+
+  o Minor bugfixes (testing, backport from 0.4.3.1-alpha):
+- When TOR_DISABLE_PRACTRACKER is set, do not apply it to the
+  test_practracker.sh script. Doing so caused a test failure. Fixes
+  bug 32705; bugfix on 0.4.2.1-alpha.
+- When TOR_DISABLE_PRACTRACKER is set, log a notice to stderr when
+  skipping practracker checks. Fixes bug 32705; bugfix
+  on 0.4.2.1-alpha.
+
+  o Minor bugfixes (correctness checks, backport from 0.4.3.1-alpha):
+- Use GCC/Clang's printf-checking feature to make sure that
+  tor_assertf() arguments are correctly typed. Fixes bug 32765;
+  bugfix on 0.4.1.1-alpha.
+
+
 Changes in version 0.4.2.5 - 2019-12-09
   This is the first stable release in the 0.4.2.x series. This series
   improves reliability and stability, and includes several stability and
diff --git a/changes/bug29819 b/changes/bug29819
deleted file mode 100644
index d37ac83d6..0
--- a/changes/bug29819
+++ /dev/null
@@ -1,8 +0,0 @@
-  o Minor bugfixes (linux seccomp sandbox):
-- Correct how we use libseccomp. Particularly, stop assuming that
-  rules are applied in a particular order or that more rules are
-  processed after the first match. Neither is the case! In libseccomp
-  <2.4.0 this lead to some rules having no effect. Libseccomp 2.4.0
-  changed how rules are generated leading to a different ordering
-  which in turn lead to a fatal crash during startup. Fixes bug
-  29819; bugfix on 0.2.5.1-alpha. Patch by Peter Gerber.
diff --git a/changes/bug32771 b/changes/bug32771
deleted file mode 100644
index 606bcf4be..0
--- a/changes/bug32771
+++ /dev/null
@@ -1,4 +0,0 @@
-  o Minor bugfixes (logging, crash):
-- Avoid a possible crash when trying to log a (fatal) assertion failure
-  about mismatched magic numbers in configuration objects. Fixes bug 32771;
-  bugfix on 0.4.2.1-alpha.
diff --git a/changes/bug32778 b/changes/bug32778
deleted file mode 100644
index ccb610469..0
--- a/changes/bug32778
+++ /dev/null
@@ -1,3 +0,0 @@
-  o Minor bugfixes (windows service):
-- Initialize publish/subscribe system when running as a windows service.
-  Fixes bug 32778; bugfix on 0.4.1.1-alpha.
diff --git a/changes/bug32841 b/changes/bug32841
deleted file mode 100644
index 

[tor-commits] [tor/release-0.4.2] Sort 0.4.2.6 changelog.

2020-01-29 Thread nickm
commit 4177746f96aa2bcc074fb2d64d8780f90a006228
Author: Nick Mathewson 
Date:   Wed Jan 29 19:56:02 2020 -0500

Sort 0.4.2.6 changelog.
---
 ChangeLog | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9a4b0a678..33aec7cf8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,16 +14,29 @@ Changes in version 0.4.2.6 - 2020-01-3x
   experimental sandbox is enabled. Fixes bug 32841; bugfix on
   0.4.1.7. Patch by Peter Gerber.
 
+  o Minor bugfixes (correctness checks, backport from 0.4.3.1-alpha):
+- Use GCC/Clang's printf-checking feature to make sure that
+  tor_assertf() arguments are correctly typed. Fixes bug 32765;
+  bugfix on 0.4.1.1-alpha.
+
   o Minor bugfixes (logging, crash, backport from 0.4.3.1-alpha):
 - Avoid a possible crash when trying to log a (fatal) assertion
   failure about mismatched magic numbers in configuration objects.
   Fixes bug 32771; bugfix on 0.4.2.1-alpha.
 
+  o Minor bugfixes (testing, backport from 0.4.3.1-alpha):
+- When TOR_DISABLE_PRACTRACKER is set, do not apply it to the
+  test_practracker.sh script. Doing so caused a test failure. Fixes
+  bug 32705; bugfix on 0.4.2.1-alpha.
+- When TOR_DISABLE_PRACTRACKER is set, log a notice to stderr when
+  skipping practracker checks. Fixes bug 32705; bugfix
+  on 0.4.2.1-alpha.
+
   o Minor bugfixes (windows service, backport from 0.4.3.1-alpha):
 - Initialize the publish/subscribe system when running as a windows
   service. Fixes bug 32778; bugfix on 0.4.1.1-alpha.
 
-  o Testing (backport from 0.4.3.1-alpha)
+  o Testing (backport from 0.4.3.1-alpha):
 - Turn off Tor's Sandbox in Chutney jobs, and run those jobs on
   Ubuntu Bionic. Turning off the Sandbox is a work-around, until we
   fix the sandbox errors in 32722. Closes ticket 32240.
@@ -35,19 +48,6 @@ Changes in version 0.4.2.6 - 2020-01-3x
   o Testing (continuous integration, backport from 0.4.3.1-alpha):
 - Use zstd in our Travis Linux builds. Closes ticket 32242.
 
-  o Minor bugfixes (testing, backport from 0.4.3.1-alpha):
-- When TOR_DISABLE_PRACTRACKER is set, do not apply it to the
-  test_practracker.sh script. Doing so caused a test failure. Fixes
-  bug 32705; bugfix on 0.4.2.1-alpha.
-- When TOR_DISABLE_PRACTRACKER is set, log a notice to stderr when
-  skipping practracker checks. Fixes bug 32705; bugfix
-  on 0.4.2.1-alpha.
-
-  o Minor bugfixes (correctness checks, backport from 0.4.3.1-alpha):
-- Use GCC/Clang's printf-checking feature to make sure that
-  tor_assertf() arguments are correctly typed. Fixes bug 32765;
-  bugfix on 0.4.1.1-alpha.
-
 
 Changes in version 0.4.2.5 - 2019-12-09
   This is the first stable release in the 0.4.2.x series. This series



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.2] Write a blurb for 0.4.2.6

2020-01-29 Thread nickm
commit db34b2fb2588dbfd62e00c7a0b0a1ade39633f4d
Author: Nick Mathewson 
Date:   Wed Jan 29 19:58:05 2020 -0500

Write a blurb for 0.4.2.6
---
 ChangeLog | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 33aec7cf8..4d2ca4f50 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 Changes in version 0.4.2.6 - 2020-01-3x
-  This is the second stable release in the 0.4.2.x series.
+  This is the second stable release in the 0.4.2.x series. It backports
+  several bugfixes from 0.4.3.1-alpha, including some that had affected
+  the Linux seccomp2 sandbox or Windows services. If you're running with
+  one of those configurations, you'll probably want to upgrade;
+  otherwise, you should be fine with 0.4.2.5.
 
   o Major bugfixes (linux seccomp sandbox, backport from 0.4.3.1-alpha):
 - Correct how we use libseccomp. Particularly, stop assuming that

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.1] Merge branch 'maint-0.4.1' into release-0.4.1

2020-01-29 Thread nickm
commit 3090839168377f17998cd9c4b7321aab7d9286c8
Merge: d211b20fb ec7f99e6e
Author: Nick Mathewson 
Date:   Wed Jan 29 19:44:48 2020 -0500

Merge branch 'maint-0.4.1' into release-0.4.1

 configure.ac| 4 ++--
 contrib/win32build/tor-mingw.nsi.in | 2 +-
 src/win32/orconfig.h| 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.2] Merge branch 'maint-0.4.2' into release-0.4.2

2020-01-29 Thread nickm
commit 8b03ae1e57dee88124f5660faabd0995deff0fe0
Merge: 924d1ebb3 f470b863a
Author: Nick Mathewson 
Date:   Wed Jan 29 19:44:48 2020 -0500

Merge branch 'maint-0.4.2' into release-0.4.2

 configure.ac| 4 ++--
 contrib/win32build/tor-mingw.nsi.in | 2 +-
 src/win32/orconfig.h| 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.2] Bump version to 0.4.2.6

2020-01-29 Thread nickm
commit f470b863a0fc8ebfff32f580e8da9f93525c9d56
Author: Nick Mathewson 
Date:   Wed Jan 29 19:44:29 2020 -0500

Bump version to 0.4.2.6
---
 configure.ac| 4 ++--
 contrib/win32build/tor-mingw.nsi.in | 2 +-
 src/win32/orconfig.h| 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0e4ecaa94..509ebcf22 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl Copyright (c) 2007-2019, The Tor Project, Inc.
 dnl See LICENSE for licensing information
 
 AC_PREREQ([2.63])
-AC_INIT([tor],[0.4.2.5-dev])
+AC_INIT([tor],[0.4.2.6])
 AC_CONFIG_SRCDIR([src/app/main/tor_main.c])
 AC_CONFIG_MACRO_DIR([m4])
 
@@ -14,7 +14,7 @@ AC_CONFIG_MACRO_DIR([m4])
 # version number changes.  Tor uses it to make sure that it
 # only shuts down for missing "required protocols" when those protocols
 # are listed as required by a consensus after this date.
-AC_DEFINE(APPROX_RELEASE_DATE, ["2019-12-09"], # for 0.4.2.5-dev
+AC_DEFINE(APPROX_RELEASE_DATE, ["2020-01-30"], # for 0.4.2.6
   [Approximate date when this software was released. (Updated when the 
version changes.)])
 
 # "foreign" means we don't follow GNU package layout standards
diff --git a/contrib/win32build/tor-mingw.nsi.in 
b/contrib/win32build/tor-mingw.nsi.in
index fab06e0e3..eeb44cf30 100644
--- a/contrib/win32build/tor-mingw.nsi.in
+++ b/contrib/win32build/tor-mingw.nsi.in
@@ -8,7 +8,7 @@
 !include "LogicLib.nsh"
 !include "FileFunc.nsh"
 !insertmacro GetParameters
-!define VERSION "0.4.2.5-dev"
+!define VERSION "0.4.2.6"
 !define INSTALLER "tor-${VERSION}-win32.exe"
 !define WEBSITE "https://www.torproject.org/;
 !define LICENSE "LICENSE"
diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h
index fb27f0276..41826faad 100644
--- a/src/win32/orconfig.h
+++ b/src/win32/orconfig.h
@@ -218,7 +218,7 @@
 #define USING_TWOS_COMPLEMENT
 
 /* Version number of package */
-#define VERSION "0.4.2.5-dev"
+#define VERSION "0.4.2.6"
 
 
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.2] Merge branch 'maint-0.4.1' into maint-0.4.2

2020-01-29 Thread nickm
commit 0fb407591b8e5e028884aa6e07b7b1550bd0c703
Merge: 7b6be02a9 ec7f99e6e
Author: Nick Mathewson 
Date:   Wed Jan 29 19:42:43 2020 -0500

Merge branch 'maint-0.4.1' into maint-0.4.2

"Ours" merge to avoid version bump.




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.4.2'

2020-01-29 Thread nickm
commit 39c5e1b84994c2f226a8530b930f215cc5ffb877
Merge: c1d4399c8 f470b863a
Author: Nick Mathewson 
Date:   Wed Jan 29 19:44:34 2020 -0500

Merge branch 'maint-0.4.2'

Use "-s ours" to avoid version bump.

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.2] bump to 0.4.1.8

2020-01-29 Thread nickm
commit ec7f99e6ef23f05d8fea4b8b63cc4f5ecc92eb33
Author: Nick Mathewson 
Date:   Wed Jan 29 19:42:24 2020 -0500

bump to 0.4.1.8
---
 configure.ac| 4 ++--
 contrib/win32build/tor-mingw.nsi.in | 2 +-
 src/win32/orconfig.h| 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9e31b3bd6..82e3f57f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl Copyright (c) 2007-2019, The Tor Project, Inc.
 dnl See LICENSE for licensing information
 
 AC_PREREQ([2.63])
-AC_INIT([tor],[0.4.1.7-dev])
+AC_INIT([tor],[0.4.1.8])
 AC_CONFIG_SRCDIR([src/app/main/tor_main.c])
 AC_CONFIG_MACRO_DIR([m4])
 
@@ -14,7 +14,7 @@ AC_CONFIG_MACRO_DIR([m4])
 # version number changes.  Tor uses it to make sure that it
 # only shuts down for missing "required protocols" when those protocols
 # are listed as required by a consensus after this date.
-AC_DEFINE(APPROX_RELEASE_DATE, ["2019-12-09"], # for 0.4.1.7-dev
+AC_DEFINE(APPROX_RELEASE_DATE, ["2020-01-30"], # for 0.4.1.8
   [Approximate date when this software was released. (Updated when the 
version changes.)])
 
 # "foreign" means we don't follow GNU package layout standards
diff --git a/contrib/win32build/tor-mingw.nsi.in 
b/contrib/win32build/tor-mingw.nsi.in
index b50746779..dfd8a1e0a 100644
--- a/contrib/win32build/tor-mingw.nsi.in
+++ b/contrib/win32build/tor-mingw.nsi.in
@@ -8,7 +8,7 @@
 !include "LogicLib.nsh"
 !include "FileFunc.nsh"
 !insertmacro GetParameters
-!define VERSION "0.4.1.7-dev"
+!define VERSION "0.4.1.8"
 !define INSTALLER "tor-${VERSION}-win32.exe"
 !define WEBSITE "https://www.torproject.org/;
 !define LICENSE "LICENSE"
diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h
index dccf73154..50a588e31 100644
--- a/src/win32/orconfig.h
+++ b/src/win32/orconfig.h
@@ -218,7 +218,7 @@
 #define USING_TWOS_COMPLEMENT
 
 /* Version number of package */
-#define VERSION "0.4.1.7-dev"
+#define VERSION "0.4.1.8"
 
 
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.1] bump to 0.4.1.8

2020-01-29 Thread nickm
commit ec7f99e6ef23f05d8fea4b8b63cc4f5ecc92eb33
Author: Nick Mathewson 
Date:   Wed Jan 29 19:42:24 2020 -0500

bump to 0.4.1.8
---
 configure.ac| 4 ++--
 contrib/win32build/tor-mingw.nsi.in | 2 +-
 src/win32/orconfig.h| 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9e31b3bd6..82e3f57f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl Copyright (c) 2007-2019, The Tor Project, Inc.
 dnl See LICENSE for licensing information
 
 AC_PREREQ([2.63])
-AC_INIT([tor],[0.4.1.7-dev])
+AC_INIT([tor],[0.4.1.8])
 AC_CONFIG_SRCDIR([src/app/main/tor_main.c])
 AC_CONFIG_MACRO_DIR([m4])
 
@@ -14,7 +14,7 @@ AC_CONFIG_MACRO_DIR([m4])
 # version number changes.  Tor uses it to make sure that it
 # only shuts down for missing "required protocols" when those protocols
 # are listed as required by a consensus after this date.
-AC_DEFINE(APPROX_RELEASE_DATE, ["2019-12-09"], # for 0.4.1.7-dev
+AC_DEFINE(APPROX_RELEASE_DATE, ["2020-01-30"], # for 0.4.1.8
   [Approximate date when this software was released. (Updated when the 
version changes.)])
 
 # "foreign" means we don't follow GNU package layout standards
diff --git a/contrib/win32build/tor-mingw.nsi.in 
b/contrib/win32build/tor-mingw.nsi.in
index b50746779..dfd8a1e0a 100644
--- a/contrib/win32build/tor-mingw.nsi.in
+++ b/contrib/win32build/tor-mingw.nsi.in
@@ -8,7 +8,7 @@
 !include "LogicLib.nsh"
 !include "FileFunc.nsh"
 !insertmacro GetParameters
-!define VERSION "0.4.1.7-dev"
+!define VERSION "0.4.1.8"
 !define INSTALLER "tor-${VERSION}-win32.exe"
 !define WEBSITE "https://www.torproject.org/;
 !define LICENSE "LICENSE"
diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h
index dccf73154..50a588e31 100644
--- a/src/win32/orconfig.h
+++ b/src/win32/orconfig.h
@@ -218,7 +218,7 @@
 #define USING_TWOS_COMPLEMENT
 
 /* Version number of package */
-#define VERSION "0.4.1.7-dev"
+#define VERSION "0.4.1.8"
 
 
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Bump version to 0.4.2.6

2020-01-29 Thread nickm
commit f470b863a0fc8ebfff32f580e8da9f93525c9d56
Author: Nick Mathewson 
Date:   Wed Jan 29 19:44:29 2020 -0500

Bump version to 0.4.2.6
---
 configure.ac| 4 ++--
 contrib/win32build/tor-mingw.nsi.in | 2 +-
 src/win32/orconfig.h| 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0e4ecaa94..509ebcf22 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl Copyright (c) 2007-2019, The Tor Project, Inc.
 dnl See LICENSE for licensing information
 
 AC_PREREQ([2.63])
-AC_INIT([tor],[0.4.2.5-dev])
+AC_INIT([tor],[0.4.2.6])
 AC_CONFIG_SRCDIR([src/app/main/tor_main.c])
 AC_CONFIG_MACRO_DIR([m4])
 
@@ -14,7 +14,7 @@ AC_CONFIG_MACRO_DIR([m4])
 # version number changes.  Tor uses it to make sure that it
 # only shuts down for missing "required protocols" when those protocols
 # are listed as required by a consensus after this date.
-AC_DEFINE(APPROX_RELEASE_DATE, ["2019-12-09"], # for 0.4.2.5-dev
+AC_DEFINE(APPROX_RELEASE_DATE, ["2020-01-30"], # for 0.4.2.6
   [Approximate date when this software was released. (Updated when the 
version changes.)])
 
 # "foreign" means we don't follow GNU package layout standards
diff --git a/contrib/win32build/tor-mingw.nsi.in 
b/contrib/win32build/tor-mingw.nsi.in
index fab06e0e3..eeb44cf30 100644
--- a/contrib/win32build/tor-mingw.nsi.in
+++ b/contrib/win32build/tor-mingw.nsi.in
@@ -8,7 +8,7 @@
 !include "LogicLib.nsh"
 !include "FileFunc.nsh"
 !insertmacro GetParameters
-!define VERSION "0.4.2.5-dev"
+!define VERSION "0.4.2.6"
 !define INSTALLER "tor-${VERSION}-win32.exe"
 !define WEBSITE "https://www.torproject.org/;
 !define LICENSE "LICENSE"
diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h
index fb27f0276..41826faad 100644
--- a/src/win32/orconfig.h
+++ b/src/win32/orconfig.h
@@ -218,7 +218,7 @@
 #define USING_TWOS_COMPLEMENT
 
 /* Version number of package */
-#define VERSION "0.4.2.5-dev"
+#define VERSION "0.4.2.6"
 
 
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.4.1' into maint-0.4.2

2020-01-29 Thread nickm
commit 0fb407591b8e5e028884aa6e07b7b1550bd0c703
Merge: 7b6be02a9 ec7f99e6e
Author: Nick Mathewson 
Date:   Wed Jan 29 19:42:43 2020 -0500

Merge branch 'maint-0.4.1' into maint-0.4.2

"Ours" merge to avoid version bump.




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] bump to 0.4.1.8

2020-01-29 Thread nickm
commit ec7f99e6ef23f05d8fea4b8b63cc4f5ecc92eb33
Author: Nick Mathewson 
Date:   Wed Jan 29 19:42:24 2020 -0500

bump to 0.4.1.8
---
 configure.ac| 4 ++--
 contrib/win32build/tor-mingw.nsi.in | 2 +-
 src/win32/orconfig.h| 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9e31b3bd6..82e3f57f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl Copyright (c) 2007-2019, The Tor Project, Inc.
 dnl See LICENSE for licensing information
 
 AC_PREREQ([2.63])
-AC_INIT([tor],[0.4.1.7-dev])
+AC_INIT([tor],[0.4.1.8])
 AC_CONFIG_SRCDIR([src/app/main/tor_main.c])
 AC_CONFIG_MACRO_DIR([m4])
 
@@ -14,7 +14,7 @@ AC_CONFIG_MACRO_DIR([m4])
 # version number changes.  Tor uses it to make sure that it
 # only shuts down for missing "required protocols" when those protocols
 # are listed as required by a consensus after this date.
-AC_DEFINE(APPROX_RELEASE_DATE, ["2019-12-09"], # for 0.4.1.7-dev
+AC_DEFINE(APPROX_RELEASE_DATE, ["2020-01-30"], # for 0.4.1.8
   [Approximate date when this software was released. (Updated when the 
version changes.)])
 
 # "foreign" means we don't follow GNU package layout standards
diff --git a/contrib/win32build/tor-mingw.nsi.in 
b/contrib/win32build/tor-mingw.nsi.in
index b50746779..dfd8a1e0a 100644
--- a/contrib/win32build/tor-mingw.nsi.in
+++ b/contrib/win32build/tor-mingw.nsi.in
@@ -8,7 +8,7 @@
 !include "LogicLib.nsh"
 !include "FileFunc.nsh"
 !insertmacro GetParameters
-!define VERSION "0.4.1.7-dev"
+!define VERSION "0.4.1.8"
 !define INSTALLER "tor-${VERSION}-win32.exe"
 !define WEBSITE "https://www.torproject.org/;
 !define LICENSE "LICENSE"
diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h
index dccf73154..50a588e31 100644
--- a/src/win32/orconfig.h
+++ b/src/win32/orconfig.h
@@ -218,7 +218,7 @@
 #define USING_TWOS_COMPLEMENT
 
 /* Version number of package */
-#define VERSION "0.4.1.7-dev"
+#define VERSION "0.4.1.8"
 
 
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.4.2] Bump version to 0.4.2.6

2020-01-29 Thread nickm
commit f470b863a0fc8ebfff32f580e8da9f93525c9d56
Author: Nick Mathewson 
Date:   Wed Jan 29 19:44:29 2020 -0500

Bump version to 0.4.2.6
---
 configure.ac| 4 ++--
 contrib/win32build/tor-mingw.nsi.in | 2 +-
 src/win32/orconfig.h| 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0e4ecaa94..509ebcf22 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl Copyright (c) 2007-2019, The Tor Project, Inc.
 dnl See LICENSE for licensing information
 
 AC_PREREQ([2.63])
-AC_INIT([tor],[0.4.2.5-dev])
+AC_INIT([tor],[0.4.2.6])
 AC_CONFIG_SRCDIR([src/app/main/tor_main.c])
 AC_CONFIG_MACRO_DIR([m4])
 
@@ -14,7 +14,7 @@ AC_CONFIG_MACRO_DIR([m4])
 # version number changes.  Tor uses it to make sure that it
 # only shuts down for missing "required protocols" when those protocols
 # are listed as required by a consensus after this date.
-AC_DEFINE(APPROX_RELEASE_DATE, ["2019-12-09"], # for 0.4.2.5-dev
+AC_DEFINE(APPROX_RELEASE_DATE, ["2020-01-30"], # for 0.4.2.6
   [Approximate date when this software was released. (Updated when the 
version changes.)])
 
 # "foreign" means we don't follow GNU package layout standards
diff --git a/contrib/win32build/tor-mingw.nsi.in 
b/contrib/win32build/tor-mingw.nsi.in
index fab06e0e3..eeb44cf30 100644
--- a/contrib/win32build/tor-mingw.nsi.in
+++ b/contrib/win32build/tor-mingw.nsi.in
@@ -8,7 +8,7 @@
 !include "LogicLib.nsh"
 !include "FileFunc.nsh"
 !insertmacro GetParameters
-!define VERSION "0.4.2.5-dev"
+!define VERSION "0.4.2.6"
 !define INSTALLER "tor-${VERSION}-win32.exe"
 !define WEBSITE "https://www.torproject.org/;
 !define LICENSE "LICENSE"
diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h
index fb27f0276..41826faad 100644
--- a/src/win32/orconfig.h
+++ b/src/win32/orconfig.h
@@ -218,7 +218,7 @@
 #define USING_TWOS_COMPLEMENT
 
 /* Version number of package */
-#define VERSION "0.4.2.5-dev"
+#define VERSION "0.4.2.6"
 
 
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.4.2] Merge branch 'maint-0.4.1' into maint-0.4.2

2020-01-29 Thread nickm
commit 0fb407591b8e5e028884aa6e07b7b1550bd0c703
Merge: 7b6be02a9 ec7f99e6e
Author: Nick Mathewson 
Date:   Wed Jan 29 19:42:43 2020 -0500

Merge branch 'maint-0.4.1' into maint-0.4.2

"Ours" merge to avoid version bump.




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.4.2] bump to 0.4.1.8

2020-01-29 Thread nickm
commit ec7f99e6ef23f05d8fea4b8b63cc4f5ecc92eb33
Author: Nick Mathewson 
Date:   Wed Jan 29 19:42:24 2020 -0500

bump to 0.4.1.8
---
 configure.ac| 4 ++--
 contrib/win32build/tor-mingw.nsi.in | 2 +-
 src/win32/orconfig.h| 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9e31b3bd6..82e3f57f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl Copyright (c) 2007-2019, The Tor Project, Inc.
 dnl See LICENSE for licensing information
 
 AC_PREREQ([2.63])
-AC_INIT([tor],[0.4.1.7-dev])
+AC_INIT([tor],[0.4.1.8])
 AC_CONFIG_SRCDIR([src/app/main/tor_main.c])
 AC_CONFIG_MACRO_DIR([m4])
 
@@ -14,7 +14,7 @@ AC_CONFIG_MACRO_DIR([m4])
 # version number changes.  Tor uses it to make sure that it
 # only shuts down for missing "required protocols" when those protocols
 # are listed as required by a consensus after this date.
-AC_DEFINE(APPROX_RELEASE_DATE, ["2019-12-09"], # for 0.4.1.7-dev
+AC_DEFINE(APPROX_RELEASE_DATE, ["2020-01-30"], # for 0.4.1.8
   [Approximate date when this software was released. (Updated when the 
version changes.)])
 
 # "foreign" means we don't follow GNU package layout standards
diff --git a/contrib/win32build/tor-mingw.nsi.in 
b/contrib/win32build/tor-mingw.nsi.in
index b50746779..dfd8a1e0a 100644
--- a/contrib/win32build/tor-mingw.nsi.in
+++ b/contrib/win32build/tor-mingw.nsi.in
@@ -8,7 +8,7 @@
 !include "LogicLib.nsh"
 !include "FileFunc.nsh"
 !insertmacro GetParameters
-!define VERSION "0.4.1.7-dev"
+!define VERSION "0.4.1.8"
 !define INSTALLER "tor-${VERSION}-win32.exe"
 !define WEBSITE "https://www.torproject.org/;
 !define LICENSE "LICENSE"
diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h
index dccf73154..50a588e31 100644
--- a/src/win32/orconfig.h
+++ b/src/win32/orconfig.h
@@ -218,7 +218,7 @@
 #define USING_TWOS_COMPLEMENT
 
 /* Version number of package */
-#define VERSION "0.4.1.7-dev"
+#define VERSION "0.4.1.8"
 
 
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.4.1] bump to 0.4.1.8

2020-01-29 Thread nickm
commit ec7f99e6ef23f05d8fea4b8b63cc4f5ecc92eb33
Author: Nick Mathewson 
Date:   Wed Jan 29 19:42:24 2020 -0500

bump to 0.4.1.8
---
 configure.ac| 4 ++--
 contrib/win32build/tor-mingw.nsi.in | 2 +-
 src/win32/orconfig.h| 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9e31b3bd6..82e3f57f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl Copyright (c) 2007-2019, The Tor Project, Inc.
 dnl See LICENSE for licensing information
 
 AC_PREREQ([2.63])
-AC_INIT([tor],[0.4.1.7-dev])
+AC_INIT([tor],[0.4.1.8])
 AC_CONFIG_SRCDIR([src/app/main/tor_main.c])
 AC_CONFIG_MACRO_DIR([m4])
 
@@ -14,7 +14,7 @@ AC_CONFIG_MACRO_DIR([m4])
 # version number changes.  Tor uses it to make sure that it
 # only shuts down for missing "required protocols" when those protocols
 # are listed as required by a consensus after this date.
-AC_DEFINE(APPROX_RELEASE_DATE, ["2019-12-09"], # for 0.4.1.7-dev
+AC_DEFINE(APPROX_RELEASE_DATE, ["2020-01-30"], # for 0.4.1.8
   [Approximate date when this software was released. (Updated when the 
version changes.)])
 
 # "foreign" means we don't follow GNU package layout standards
diff --git a/contrib/win32build/tor-mingw.nsi.in 
b/contrib/win32build/tor-mingw.nsi.in
index b50746779..dfd8a1e0a 100644
--- a/contrib/win32build/tor-mingw.nsi.in
+++ b/contrib/win32build/tor-mingw.nsi.in
@@ -8,7 +8,7 @@
 !include "LogicLib.nsh"
 !include "FileFunc.nsh"
 !insertmacro GetParameters
-!define VERSION "0.4.1.7-dev"
+!define VERSION "0.4.1.8"
 !define INSTALLER "tor-${VERSION}-win32.exe"
 !define WEBSITE "https://www.torproject.org/;
 !define LICENSE "LICENSE"
diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h
index dccf73154..50a588e31 100644
--- a/src/win32/orconfig.h
+++ b/src/win32/orconfig.h
@@ -218,7 +218,7 @@
 #define USING_TWOS_COMPLEMENT
 
 /* Version number of package */
-#define VERSION "0.4.1.7-dev"
+#define VERSION "0.4.1.8"
 
 
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.1] Merge branch 'maint-0.4.1' into release-0.4.1

2020-01-29 Thread teor
commit d211b20fbf80c03818d99e99d68e5ae8a3884295
Merge: 2be3b8275 6b392c333
Author: teor 
Date:   Thu Jan 30 07:55:09 2020 +1000

Merge branch 'maint-0.4.1' into release-0.4.1

 changes/bug29819  |  8 
 changes/bug32778  |  3 +++
 src/app/main/main.c   |  4 ++--
 src/app/main/main.h   |  3 +++
 src/app/main/ntmain.c |  7 +++
 src/lib/sandbox/sandbox.c | 40 ++--
 6 files changed, 25 insertions(+), 40 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.2] Correct how we use libseccomp

2020-01-29 Thread teor
commit 0d64bafcfedd259fb15b3ee85a7b00a840aec73b
Author: Peter Gerber 
Date:   Mon Jun 10 14:56:31 2019 +0200

Correct how we use libseccomp

This fixes a startup crash with libseccomp v2.4.0 if Sandbox is
set to 1.
---
 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)

diff --git a/changes/bug29819 b/changes/bug29819
new file mode 100644
index 0..d37ac83d6
--- /dev/null
+++ b/changes/bug29819
@@ -0,0 +1,8 @@
+  o Minor bugfixes (linux seccomp sandbox):
+- Correct how we use libseccomp. Particularly, stop assuming that
+  rules are applied in a particular order or that more rules are
+  processed after the first match. Neither is the case! In libseccomp
+  <2.4.0 this lead to some rules having no effect. Libseccomp 2.4.0
+  changed how rules are generated leading to a different ordering
+  which in turn lead to a fatal crash during startup. Fixes bug
+  29819; bugfix on 0.2.5.1-alpha. Patch by Peter Gerber.
diff --git a/src/lib/sandbox/sandbox.c b/src/lib/sandbox/sandbox.c
index e2356a172..8f577b066 100644
--- a/src/lib/sandbox/sandbox.c
+++ b/src/lib/sandbox/sandbox.c
@@ -491,24 +491,6 @@ sb_open(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
 }
   }
 
-  rc = seccomp_rule_add_1(ctx, SCMP_ACT_ERRNO(EACCES), SCMP_SYS(open),
-SCMP_CMP_MASKED(1, O_CLOEXEC|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW,
-O_RDONLY));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add open syscall, received libseccomp "
-"error %d", rc);
-return rc;
-  }
-
-  rc = seccomp_rule_add_1(ctx, SCMP_ACT_ERRNO(EACCES), SCMP_SYS(openat),
-SCMP_CMP_MASKED(2, O_CLOEXEC|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW,
-O_RDONLY));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add openat syscall, received "
-"libseccomp error %d", rc);
-return rc;
-  }
-
   return 0;
 }
 
@@ -562,23 +544,6 @@ sb_chown(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
   return 0;
 }
 
-static int
-sb__sysctl(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
-{
-  int rc;
-  (void) filter;
-  (void) ctx;
-
-  rc = seccomp_rule_add_0(ctx, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(_sysctl));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add _sysctl syscall, "
-"received libseccomp error %d", rc);
-return rc;
-  }
-
-  return 0;
-}
-
 /**
  * Function responsible for setting up the rename syscall for
  * the seccomp filter sandbox.
@@ -1141,7 +1106,6 @@ static sandbox_filter_func_t filter_func[] = {
 sb_chmod,
 sb_open,
 sb_openat,
-sb__sysctl,
 sb_rename,
 #ifdef __NR_fcntl64
 sb_fcntl64,
@@ -1518,14 +1482,14 @@ install_syscall_filter(sandbox_cfg_t* cfg)
   int rc = 0;
   scmp_filter_ctx ctx;
 
-  ctx = seccomp_init(SCMP_ACT_TRAP);
+  ctx = seccomp_init(SCMP_ACT_ERRNO(EPERM));
   if (ctx == NULL) {
 log_err(LD_BUG,"(Sandbox) failed to initialise libseccomp context");
 rc = -1;
 goto end;
   }
 
-  // protectign sandbox parameter strings
+  // protecting sandbox parameter strings
   if ((rc = prot_strings(ctx, cfg))) {
 goto end;
   }



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.2] Merge branch 'maint-0.4.0' into maint-0.4.1

2020-01-29 Thread teor
commit 6b392c333a854bb4d18ae6ea1686627451bb03f8
Merge: 9b0b2aef8 65825018c
Author: teor 
Date:   Thu Jan 30 07:55:05 2020 +1000

Merge branch 'maint-0.4.0' into maint-0.4.1

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.2] Merge branch 'maint-0.3.5' into maint-0.4.0

2020-01-29 Thread teor
commit 65825018c7aed931324dd427bb1e84544a9b2f47
Merge: 026f068bb 41d52e9cd
Author: teor 
Date:   Thu Jan 30 07:54:58 2020 +1000

Merge branch 'maint-0.3.5' into maint-0.4.0

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.2] Merge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5

2020-01-29 Thread teor
commit 41d52e9cd80bfb318ec7f0969f3889d275012e37
Merge: 19954cffd 0d64bafcf
Author: teor 
Date:   Thu Jan 30 07:53:53 2020 +1000

Merge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.1] Correct how we use libseccomp

2020-01-29 Thread teor
commit 0d64bafcfedd259fb15b3ee85a7b00a840aec73b
Author: Peter Gerber 
Date:   Mon Jun 10 14:56:31 2019 +0200

Correct how we use libseccomp

This fixes a startup crash with libseccomp v2.4.0 if Sandbox is
set to 1.
---
 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)

diff --git a/changes/bug29819 b/changes/bug29819
new file mode 100644
index 0..d37ac83d6
--- /dev/null
+++ b/changes/bug29819
@@ -0,0 +1,8 @@
+  o Minor bugfixes (linux seccomp sandbox):
+- Correct how we use libseccomp. Particularly, stop assuming that
+  rules are applied in a particular order or that more rules are
+  processed after the first match. Neither is the case! In libseccomp
+  <2.4.0 this lead to some rules having no effect. Libseccomp 2.4.0
+  changed how rules are generated leading to a different ordering
+  which in turn lead to a fatal crash during startup. Fixes bug
+  29819; bugfix on 0.2.5.1-alpha. Patch by Peter Gerber.
diff --git a/src/lib/sandbox/sandbox.c b/src/lib/sandbox/sandbox.c
index e2356a172..8f577b066 100644
--- a/src/lib/sandbox/sandbox.c
+++ b/src/lib/sandbox/sandbox.c
@@ -491,24 +491,6 @@ sb_open(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
 }
   }
 
-  rc = seccomp_rule_add_1(ctx, SCMP_ACT_ERRNO(EACCES), SCMP_SYS(open),
-SCMP_CMP_MASKED(1, O_CLOEXEC|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW,
-O_RDONLY));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add open syscall, received libseccomp "
-"error %d", rc);
-return rc;
-  }
-
-  rc = seccomp_rule_add_1(ctx, SCMP_ACT_ERRNO(EACCES), SCMP_SYS(openat),
-SCMP_CMP_MASKED(2, O_CLOEXEC|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW,
-O_RDONLY));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add openat syscall, received "
-"libseccomp error %d", rc);
-return rc;
-  }
-
   return 0;
 }
 
@@ -562,23 +544,6 @@ sb_chown(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
   return 0;
 }
 
-static int
-sb__sysctl(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
-{
-  int rc;
-  (void) filter;
-  (void) ctx;
-
-  rc = seccomp_rule_add_0(ctx, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(_sysctl));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add _sysctl syscall, "
-"received libseccomp error %d", rc);
-return rc;
-  }
-
-  return 0;
-}
-
 /**
  * Function responsible for setting up the rename syscall for
  * the seccomp filter sandbox.
@@ -1141,7 +1106,6 @@ static sandbox_filter_func_t filter_func[] = {
 sb_chmod,
 sb_open,
 sb_openat,
-sb__sysctl,
 sb_rename,
 #ifdef __NR_fcntl64
 sb_fcntl64,
@@ -1518,14 +1482,14 @@ install_syscall_filter(sandbox_cfg_t* cfg)
   int rc = 0;
   scmp_filter_ctx ctx;
 
-  ctx = seccomp_init(SCMP_ACT_TRAP);
+  ctx = seccomp_init(SCMP_ACT_ERRNO(EPERM));
   if (ctx == NULL) {
 log_err(LD_BUG,"(Sandbox) failed to initialise libseccomp context");
 rc = -1;
 goto end;
   }
 
-  // protectign sandbox parameter strings
+  // protecting sandbox parameter strings
   if ((rc = prot_strings(ctx, cfg))) {
 goto end;
   }



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.2] Initialize publish/subscribe code when running as an NT service.

2020-01-29 Thread teor
commit 54eec5342d45e9add5b9a8fee0167267c38f63f9
Author: Nick Mathewson 
Date:   Mon Jan 6 08:45:29 2020 -0500

Initialize publish/subscribe code when running as an NT service.

Fixes bug 32778; bugfix on 0.4.1.1-alpha.
---
 changes/bug32778  | 3 +++
 src/app/main/main.c   | 4 ++--
 src/app/main/main.h   | 3 +++
 src/app/main/ntmain.c | 7 +++
 4 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/changes/bug32778 b/changes/bug32778
new file mode 100644
index 0..ccb610469
--- /dev/null
+++ b/changes/bug32778
@@ -0,0 +1,3 @@
+  o Minor bugfixes (windows service):
+- Initialize publish/subscribe system when running as a windows service.
+  Fixes bug 32778; bugfix on 0.4.1.1-alpha.
diff --git a/src/app/main/main.c b/src/app/main/main.c
index 6e325f0b1..f3772f86e 100644
--- a/src/app/main/main.c
+++ b/src/app/main/main.c
@@ -1236,7 +1236,7 @@ run_tor_main_loop(void)
 }
 
 /** Install the publish/subscribe relationships for all the subsystems. */
-static void
+void
 pubsub_install(void)
 {
 pubsub_builder_t *builder = pubsub_builder_new();
@@ -1248,7 +1248,7 @@ pubsub_install(void)
 
 /** Connect the mainloop to its publish/subscribe message delivery events if
  * appropriate, and configure the global channels appropriately. */
-static void
+void
 pubsub_connect(void)
 {
   if (get_options()->command == CMD_RUN_TOR) {
diff --git a/src/app/main/main.h b/src/app/main/main.h
index 9dfaf4b8e..76574a907 100644
--- a/src/app/main/main.h
+++ b/src/app/main/main.h
@@ -25,4 +25,7 @@ int tor_init(int argc, char **argv);
 
 int run_tor_main_loop(void);
 
+void pubsub_install(void);
+void pubsub_connect(void);
+
 #endif /* !defined(TOR_MAIN_H) */
diff --git a/src/app/main/ntmain.c b/src/app/main/ntmain.c
index f00b71270..c5a812203 100644
--- a/src/app/main/ntmain.c
+++ b/src/app/main/ntmain.c
@@ -283,7 +283,9 @@ nt_service_body(int argc, char **argv)
 return;
   }
 
+  pubsub_install();
   r = tor_init(backup_argc, backup_argv);
+
   if (r) {
 /* Failed to start the Tor service */
 r = NT_SERVICE_ERROR_TORINIT_FAILED;
@@ -294,6 +296,8 @@ nt_service_body(int argc, char **argv)
 return;
   }
 
+  pubsub_connect();
+
   /* Set the service's status to SERVICE_RUNNING and start the main
* event loop */
   service_status.dwCurrentState = SERVICE_RUNNING;
@@ -322,9 +326,12 @@ nt_service_main(void)
 errmsg = format_win32_error(result);
 printf("Service error %d : %s\n", (int) result, errmsg);
 tor_free(errmsg);
+
+pubsub_install();
 if (result == ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) {
   if (tor_init(backup_argc, backup_argv))
 return;
+  pubsub_connect();
   switch (get_options()->command) {
   case CMD_RUN_TOR:
 run_tor_main_loop();



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.2] Merge remote-tracking branch 'tor-github/pr/1634' into maint-0.4.1

2020-01-29 Thread teor
commit 9b0b2aef806c5d9bcb5e5acd4b4c3cf7488ec442
Merge: fb541ffca 54eec5342
Author: teor 
Date:   Thu Jan 30 07:54:39 2020 +1000

Merge remote-tracking branch 'tor-github/pr/1634' into maint-0.4.1

 changes/bug32778  | 3 +++
 src/app/main/main.c   | 4 ++--
 src/app/main/main.h   | 3 +++
 src/app/main/ntmain.c | 7 +++
 4 files changed, 15 insertions(+), 2 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.2] Merge branch 'maint-0.4.1' into maint-0.4.2

2020-01-29 Thread teor
commit 7b6be02a923075ec3966d967cca26eb8d16b645e
Merge: 48187248d 6b392c333
Author: teor 
Date:   Thu Jan 30 07:55:12 2020 +1000

Merge branch 'maint-0.4.1' into maint-0.4.2

 changes/bug29819  |  8 
 changes/bug32778  |  3 +++
 src/app/main/main.c   |  4 ++--
 src/app/main/main.h   |  3 +++
 src/app/main/ntmain.c |  7 +++
 src/lib/sandbox/sandbox.c | 40 ++--
 6 files changed, 25 insertions(+), 40 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.1] Merge remote-tracking branch 'tor-github/pr/1634' into maint-0.4.1

2020-01-29 Thread teor
commit 9b0b2aef806c5d9bcb5e5acd4b4c3cf7488ec442
Merge: fb541ffca 54eec5342
Author: teor 
Date:   Thu Jan 30 07:54:39 2020 +1000

Merge remote-tracking branch 'tor-github/pr/1634' into maint-0.4.1

 changes/bug32778  | 3 +++
 src/app/main/main.c   | 4 ++--
 src/app/main/main.h   | 3 +++
 src/app/main/ntmain.c | 7 +++
 4 files changed, 15 insertions(+), 2 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.1] Merge branch 'maint-0.3.5' into maint-0.4.0

2020-01-29 Thread teor
commit 65825018c7aed931324dd427bb1e84544a9b2f47
Merge: 026f068bb 41d52e9cd
Author: teor 
Date:   Thu Jan 30 07:54:58 2020 +1000

Merge branch 'maint-0.3.5' into maint-0.4.0

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.2] Merge branch 'maint-0.4.2' into release-0.4.2

2020-01-29 Thread teor
commit 924d1ebb384f9a586e3b8fbf6eed12bf55db77f2
Merge: 3bfbeff80 7b6be02a9
Author: teor 
Date:   Thu Jan 30 07:55:16 2020 +1000

Merge branch 'maint-0.4.2' into release-0.4.2

 changes/bug29819  |  8 
 changes/bug32778  |  3 +++
 src/app/main/main.c   |  4 ++--
 src/app/main/main.h   |  3 +++
 src/app/main/ntmain.c |  7 +++
 src/lib/sandbox/sandbox.c | 40 ++--
 6 files changed, 25 insertions(+), 40 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.0] Merge branch 'maint-0.4.0' into release-0.4.0

2020-01-29 Thread teor
commit d0d2aba9f32fd6725f84f5d8a91ef6798e3dbb73
Merge: 8e3e8b0a1 65825018c
Author: teor 
Date:   Thu Jan 30 07:55:01 2020 +1000

Merge branch 'maint-0.4.0' into release-0.4.0

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.1] Merge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5

2020-01-29 Thread teor
commit 41d52e9cd80bfb318ec7f0969f3889d275012e37
Merge: 19954cffd 0d64bafcf
Author: teor 
Date:   Thu Jan 30 07:53:53 2020 +1000

Merge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.1] Merge branch 'maint-0.4.0' into maint-0.4.1

2020-01-29 Thread teor
commit 6b392c333a854bb4d18ae6ea1686627451bb03f8
Merge: 9b0b2aef8 65825018c
Author: teor 
Date:   Thu Jan 30 07:55:05 2020 +1000

Merge branch 'maint-0.4.0' into maint-0.4.1

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.0] Merge branch 'maint-0.3.5' into maint-0.4.0

2020-01-29 Thread teor
commit 65825018c7aed931324dd427bb1e84544a9b2f47
Merge: 026f068bb 41d52e9cd
Author: teor 
Date:   Thu Jan 30 07:54:58 2020 +1000

Merge branch 'maint-0.3.5' into maint-0.4.0

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.5] Merge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5

2020-01-29 Thread teor
commit 41d52e9cd80bfb318ec7f0969f3889d275012e37
Merge: 19954cffd 0d64bafcf
Author: teor 
Date:   Thu Jan 30 07:53:53 2020 +1000

Merge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.5] Merge branch 'maint-0.3.5' into release-0.3.5

2020-01-29 Thread teor
commit c3e300dc9c4b63c88bd1e0add0335cf6662d6ec1
Merge: 792172ffe 41d52e9cd
Author: teor 
Date:   Thu Jan 30 07:54:54 2020 +1000

Merge branch 'maint-0.3.5' into release-0.3.5

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.5] Correct how we use libseccomp

2020-01-29 Thread teor
commit 0d64bafcfedd259fb15b3ee85a7b00a840aec73b
Author: Peter Gerber 
Date:   Mon Jun 10 14:56:31 2019 +0200

Correct how we use libseccomp

This fixes a startup crash with libseccomp v2.4.0 if Sandbox is
set to 1.
---
 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)

diff --git a/changes/bug29819 b/changes/bug29819
new file mode 100644
index 0..d37ac83d6
--- /dev/null
+++ b/changes/bug29819
@@ -0,0 +1,8 @@
+  o Minor bugfixes (linux seccomp sandbox):
+- Correct how we use libseccomp. Particularly, stop assuming that
+  rules are applied in a particular order or that more rules are
+  processed after the first match. Neither is the case! In libseccomp
+  <2.4.0 this lead to some rules having no effect. Libseccomp 2.4.0
+  changed how rules are generated leading to a different ordering
+  which in turn lead to a fatal crash during startup. Fixes bug
+  29819; bugfix on 0.2.5.1-alpha. Patch by Peter Gerber.
diff --git a/src/lib/sandbox/sandbox.c b/src/lib/sandbox/sandbox.c
index e2356a172..8f577b066 100644
--- a/src/lib/sandbox/sandbox.c
+++ b/src/lib/sandbox/sandbox.c
@@ -491,24 +491,6 @@ sb_open(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
 }
   }
 
-  rc = seccomp_rule_add_1(ctx, SCMP_ACT_ERRNO(EACCES), SCMP_SYS(open),
-SCMP_CMP_MASKED(1, O_CLOEXEC|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW,
-O_RDONLY));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add open syscall, received libseccomp "
-"error %d", rc);
-return rc;
-  }
-
-  rc = seccomp_rule_add_1(ctx, SCMP_ACT_ERRNO(EACCES), SCMP_SYS(openat),
-SCMP_CMP_MASKED(2, O_CLOEXEC|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW,
-O_RDONLY));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add openat syscall, received "
-"libseccomp error %d", rc);
-return rc;
-  }
-
   return 0;
 }
 
@@ -562,23 +544,6 @@ sb_chown(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
   return 0;
 }
 
-static int
-sb__sysctl(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
-{
-  int rc;
-  (void) filter;
-  (void) ctx;
-
-  rc = seccomp_rule_add_0(ctx, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(_sysctl));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add _sysctl syscall, "
-"received libseccomp error %d", rc);
-return rc;
-  }
-
-  return 0;
-}
-
 /**
  * Function responsible for setting up the rename syscall for
  * the seccomp filter sandbox.
@@ -1141,7 +1106,6 @@ static sandbox_filter_func_t filter_func[] = {
 sb_chmod,
 sb_open,
 sb_openat,
-sb__sysctl,
 sb_rename,
 #ifdef __NR_fcntl64
 sb_fcntl64,
@@ -1518,14 +1482,14 @@ install_syscall_filter(sandbox_cfg_t* cfg)
   int rc = 0;
   scmp_filter_ctx ctx;
 
-  ctx = seccomp_init(SCMP_ACT_TRAP);
+  ctx = seccomp_init(SCMP_ACT_ERRNO(EPERM));
   if (ctx == NULL) {
 log_err(LD_BUG,"(Sandbox) failed to initialise libseccomp context");
 rc = -1;
 goto end;
   }
 
-  // protectign sandbox parameter strings
+  // protecting sandbox parameter strings
   if ((rc = prot_strings(ctx, cfg))) {
 goto end;
   }



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.4.2] Merge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5

2020-01-29 Thread teor
commit 41d52e9cd80bfb318ec7f0969f3889d275012e37
Merge: 19954cffd 0d64bafcf
Author: teor 
Date:   Thu Jan 30 07:53:53 2020 +1000

Merge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.4.2] Merge remote-tracking branch 'tor-github/pr/1634' into maint-0.4.1

2020-01-29 Thread teor
commit 9b0b2aef806c5d9bcb5e5acd4b4c3cf7488ec442
Merge: fb541ffca 54eec5342
Author: teor 
Date:   Thu Jan 30 07:54:39 2020 +1000

Merge remote-tracking branch 'tor-github/pr/1634' into maint-0.4.1

 changes/bug32778  | 3 +++
 src/app/main/main.c   | 4 ++--
 src/app/main/main.h   | 3 +++
 src/app/main/ntmain.c | 7 +++
 4 files changed, 15 insertions(+), 2 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.1] Initialize publish/subscribe code when running as an NT service.

2020-01-29 Thread teor
commit 54eec5342d45e9add5b9a8fee0167267c38f63f9
Author: Nick Mathewson 
Date:   Mon Jan 6 08:45:29 2020 -0500

Initialize publish/subscribe code when running as an NT service.

Fixes bug 32778; bugfix on 0.4.1.1-alpha.
---
 changes/bug32778  | 3 +++
 src/app/main/main.c   | 4 ++--
 src/app/main/main.h   | 3 +++
 src/app/main/ntmain.c | 7 +++
 4 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/changes/bug32778 b/changes/bug32778
new file mode 100644
index 0..ccb610469
--- /dev/null
+++ b/changes/bug32778
@@ -0,0 +1,3 @@
+  o Minor bugfixes (windows service):
+- Initialize publish/subscribe system when running as a windows service.
+  Fixes bug 32778; bugfix on 0.4.1.1-alpha.
diff --git a/src/app/main/main.c b/src/app/main/main.c
index 6e325f0b1..f3772f86e 100644
--- a/src/app/main/main.c
+++ b/src/app/main/main.c
@@ -1236,7 +1236,7 @@ run_tor_main_loop(void)
 }
 
 /** Install the publish/subscribe relationships for all the subsystems. */
-static void
+void
 pubsub_install(void)
 {
 pubsub_builder_t *builder = pubsub_builder_new();
@@ -1248,7 +1248,7 @@ pubsub_install(void)
 
 /** Connect the mainloop to its publish/subscribe message delivery events if
  * appropriate, and configure the global channels appropriately. */
-static void
+void
 pubsub_connect(void)
 {
   if (get_options()->command == CMD_RUN_TOR) {
diff --git a/src/app/main/main.h b/src/app/main/main.h
index 9dfaf4b8e..76574a907 100644
--- a/src/app/main/main.h
+++ b/src/app/main/main.h
@@ -25,4 +25,7 @@ int tor_init(int argc, char **argv);
 
 int run_tor_main_loop(void);
 
+void pubsub_install(void);
+void pubsub_connect(void);
+
 #endif /* !defined(TOR_MAIN_H) */
diff --git a/src/app/main/ntmain.c b/src/app/main/ntmain.c
index f00b71270..c5a812203 100644
--- a/src/app/main/ntmain.c
+++ b/src/app/main/ntmain.c
@@ -283,7 +283,9 @@ nt_service_body(int argc, char **argv)
 return;
   }
 
+  pubsub_install();
   r = tor_init(backup_argc, backup_argv);
+
   if (r) {
 /* Failed to start the Tor service */
 r = NT_SERVICE_ERROR_TORINIT_FAILED;
@@ -294,6 +296,8 @@ nt_service_body(int argc, char **argv)
 return;
   }
 
+  pubsub_connect();
+
   /* Set the service's status to SERVICE_RUNNING and start the main
* event loop */
   service_status.dwCurrentState = SERVICE_RUNNING;
@@ -322,9 +326,12 @@ nt_service_main(void)
 errmsg = format_win32_error(result);
 printf("Service error %d : %s\n", (int) result, errmsg);
 tor_free(errmsg);
+
+pubsub_install();
 if (result == ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) {
   if (tor_init(backup_argc, backup_argv))
 return;
+  pubsub_connect();
   switch (get_options()->command) {
   case CMD_RUN_TOR:
 run_tor_main_loop();



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.4.2] Merge branch 'maint-0.4.1' into maint-0.4.2

2020-01-29 Thread teor
commit 7b6be02a923075ec3966d967cca26eb8d16b645e
Merge: 48187248d 6b392c333
Author: teor 
Date:   Thu Jan 30 07:55:12 2020 +1000

Merge branch 'maint-0.4.1' into maint-0.4.2

 changes/bug29819  |  8 
 changes/bug32778  |  3 +++
 src/app/main/main.c   |  4 ++--
 src/app/main/main.h   |  3 +++
 src/app/main/ntmain.c |  7 +++
 src/lib/sandbox/sandbox.c | 40 ++--
 6 files changed, 25 insertions(+), 40 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.4.2] Correct how we use libseccomp

2020-01-29 Thread teor
commit 0d64bafcfedd259fb15b3ee85a7b00a840aec73b
Author: Peter Gerber 
Date:   Mon Jun 10 14:56:31 2019 +0200

Correct how we use libseccomp

This fixes a startup crash with libseccomp v2.4.0 if Sandbox is
set to 1.
---
 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)

diff --git a/changes/bug29819 b/changes/bug29819
new file mode 100644
index 0..d37ac83d6
--- /dev/null
+++ b/changes/bug29819
@@ -0,0 +1,8 @@
+  o Minor bugfixes (linux seccomp sandbox):
+- Correct how we use libseccomp. Particularly, stop assuming that
+  rules are applied in a particular order or that more rules are
+  processed after the first match. Neither is the case! In libseccomp
+  <2.4.0 this lead to some rules having no effect. Libseccomp 2.4.0
+  changed how rules are generated leading to a different ordering
+  which in turn lead to a fatal crash during startup. Fixes bug
+  29819; bugfix on 0.2.5.1-alpha. Patch by Peter Gerber.
diff --git a/src/lib/sandbox/sandbox.c b/src/lib/sandbox/sandbox.c
index e2356a172..8f577b066 100644
--- a/src/lib/sandbox/sandbox.c
+++ b/src/lib/sandbox/sandbox.c
@@ -491,24 +491,6 @@ sb_open(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
 }
   }
 
-  rc = seccomp_rule_add_1(ctx, SCMP_ACT_ERRNO(EACCES), SCMP_SYS(open),
-SCMP_CMP_MASKED(1, O_CLOEXEC|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW,
-O_RDONLY));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add open syscall, received libseccomp "
-"error %d", rc);
-return rc;
-  }
-
-  rc = seccomp_rule_add_1(ctx, SCMP_ACT_ERRNO(EACCES), SCMP_SYS(openat),
-SCMP_CMP_MASKED(2, O_CLOEXEC|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW,
-O_RDONLY));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add openat syscall, received "
-"libseccomp error %d", rc);
-return rc;
-  }
-
   return 0;
 }
 
@@ -562,23 +544,6 @@ sb_chown(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
   return 0;
 }
 
-static int
-sb__sysctl(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
-{
-  int rc;
-  (void) filter;
-  (void) ctx;
-
-  rc = seccomp_rule_add_0(ctx, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(_sysctl));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add _sysctl syscall, "
-"received libseccomp error %d", rc);
-return rc;
-  }
-
-  return 0;
-}
-
 /**
  * Function responsible for setting up the rename syscall for
  * the seccomp filter sandbox.
@@ -1141,7 +1106,6 @@ static sandbox_filter_func_t filter_func[] = {
 sb_chmod,
 sb_open,
 sb_openat,
-sb__sysctl,
 sb_rename,
 #ifdef __NR_fcntl64
 sb_fcntl64,
@@ -1518,14 +1482,14 @@ install_syscall_filter(sandbox_cfg_t* cfg)
   int rc = 0;
   scmp_filter_ctx ctx;
 
-  ctx = seccomp_init(SCMP_ACT_TRAP);
+  ctx = seccomp_init(SCMP_ACT_ERRNO(EPERM));
   if (ctx == NULL) {
 log_err(LD_BUG,"(Sandbox) failed to initialise libseccomp context");
 rc = -1;
 goto end;
   }
 
-  // protectign sandbox parameter strings
+  // protecting sandbox parameter strings
   if ((rc = prot_strings(ctx, cfg))) {
 goto end;
   }



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.4.1] Merge branch 'maint-0.3.5' into maint-0.4.0

2020-01-29 Thread teor
commit 65825018c7aed931324dd427bb1e84544a9b2f47
Merge: 026f068bb 41d52e9cd
Author: teor 
Date:   Thu Jan 30 07:54:58 2020 +1000

Merge branch 'maint-0.3.5' into maint-0.4.0

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.4.2] Initialize publish/subscribe code when running as an NT service.

2020-01-29 Thread teor
commit 54eec5342d45e9add5b9a8fee0167267c38f63f9
Author: Nick Mathewson 
Date:   Mon Jan 6 08:45:29 2020 -0500

Initialize publish/subscribe code when running as an NT service.

Fixes bug 32778; bugfix on 0.4.1.1-alpha.
---
 changes/bug32778  | 3 +++
 src/app/main/main.c   | 4 ++--
 src/app/main/main.h   | 3 +++
 src/app/main/ntmain.c | 7 +++
 4 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/changes/bug32778 b/changes/bug32778
new file mode 100644
index 0..ccb610469
--- /dev/null
+++ b/changes/bug32778
@@ -0,0 +1,3 @@
+  o Minor bugfixes (windows service):
+- Initialize publish/subscribe system when running as a windows service.
+  Fixes bug 32778; bugfix on 0.4.1.1-alpha.
diff --git a/src/app/main/main.c b/src/app/main/main.c
index 6e325f0b1..f3772f86e 100644
--- a/src/app/main/main.c
+++ b/src/app/main/main.c
@@ -1236,7 +1236,7 @@ run_tor_main_loop(void)
 }
 
 /** Install the publish/subscribe relationships for all the subsystems. */
-static void
+void
 pubsub_install(void)
 {
 pubsub_builder_t *builder = pubsub_builder_new();
@@ -1248,7 +1248,7 @@ pubsub_install(void)
 
 /** Connect the mainloop to its publish/subscribe message delivery events if
  * appropriate, and configure the global channels appropriately. */
-static void
+void
 pubsub_connect(void)
 {
   if (get_options()->command == CMD_RUN_TOR) {
diff --git a/src/app/main/main.h b/src/app/main/main.h
index 9dfaf4b8e..76574a907 100644
--- a/src/app/main/main.h
+++ b/src/app/main/main.h
@@ -25,4 +25,7 @@ int tor_init(int argc, char **argv);
 
 int run_tor_main_loop(void);
 
+void pubsub_install(void);
+void pubsub_connect(void);
+
 #endif /* !defined(TOR_MAIN_H) */
diff --git a/src/app/main/ntmain.c b/src/app/main/ntmain.c
index f00b71270..c5a812203 100644
--- a/src/app/main/ntmain.c
+++ b/src/app/main/ntmain.c
@@ -283,7 +283,9 @@ nt_service_body(int argc, char **argv)
 return;
   }
 
+  pubsub_install();
   r = tor_init(backup_argc, backup_argv);
+
   if (r) {
 /* Failed to start the Tor service */
 r = NT_SERVICE_ERROR_TORINIT_FAILED;
@@ -294,6 +296,8 @@ nt_service_body(int argc, char **argv)
 return;
   }
 
+  pubsub_connect();
+
   /* Set the service's status to SERVICE_RUNNING and start the main
* event loop */
   service_status.dwCurrentState = SERVICE_RUNNING;
@@ -322,9 +326,12 @@ nt_service_main(void)
 errmsg = format_win32_error(result);
 printf("Service error %d : %s\n", (int) result, errmsg);
 tor_free(errmsg);
+
+pubsub_install();
 if (result == ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) {
   if (tor_init(backup_argc, backup_argv))
 return;
+  pubsub_connect();
   switch (get_options()->command) {
   case CMD_RUN_TOR:
 run_tor_main_loop();



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.4.2] Merge branch 'maint-0.3.5' into maint-0.4.0

2020-01-29 Thread teor
commit 65825018c7aed931324dd427bb1e84544a9b2f47
Merge: 026f068bb 41d52e9cd
Author: teor 
Date:   Thu Jan 30 07:54:58 2020 +1000

Merge branch 'maint-0.3.5' into maint-0.4.0

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.4.1] Merge remote-tracking branch 'tor-github/pr/1634' into maint-0.4.1

2020-01-29 Thread teor
commit 9b0b2aef806c5d9bcb5e5acd4b4c3cf7488ec442
Merge: fb541ffca 54eec5342
Author: teor 
Date:   Thu Jan 30 07:54:39 2020 +1000

Merge remote-tracking branch 'tor-github/pr/1634' into maint-0.4.1

 changes/bug32778  | 3 +++
 src/app/main/main.c   | 4 ++--
 src/app/main/main.h   | 3 +++
 src/app/main/ntmain.c | 7 +++
 4 files changed, 15 insertions(+), 2 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.0] Merge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5

2020-01-29 Thread teor
commit 41d52e9cd80bfb318ec7f0969f3889d275012e37
Merge: 19954cffd 0d64bafcf
Author: teor 
Date:   Thu Jan 30 07:53:53 2020 +1000

Merge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.4.0] Correct how we use libseccomp

2020-01-29 Thread teor
commit 0d64bafcfedd259fb15b3ee85a7b00a840aec73b
Author: Peter Gerber 
Date:   Mon Jun 10 14:56:31 2019 +0200

Correct how we use libseccomp

This fixes a startup crash with libseccomp v2.4.0 if Sandbox is
set to 1.
---
 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)

diff --git a/changes/bug29819 b/changes/bug29819
new file mode 100644
index 0..d37ac83d6
--- /dev/null
+++ b/changes/bug29819
@@ -0,0 +1,8 @@
+  o Minor bugfixes (linux seccomp sandbox):
+- Correct how we use libseccomp. Particularly, stop assuming that
+  rules are applied in a particular order or that more rules are
+  processed after the first match. Neither is the case! In libseccomp
+  <2.4.0 this lead to some rules having no effect. Libseccomp 2.4.0
+  changed how rules are generated leading to a different ordering
+  which in turn lead to a fatal crash during startup. Fixes bug
+  29819; bugfix on 0.2.5.1-alpha. Patch by Peter Gerber.
diff --git a/src/lib/sandbox/sandbox.c b/src/lib/sandbox/sandbox.c
index e2356a172..8f577b066 100644
--- a/src/lib/sandbox/sandbox.c
+++ b/src/lib/sandbox/sandbox.c
@@ -491,24 +491,6 @@ sb_open(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
 }
   }
 
-  rc = seccomp_rule_add_1(ctx, SCMP_ACT_ERRNO(EACCES), SCMP_SYS(open),
-SCMP_CMP_MASKED(1, O_CLOEXEC|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW,
-O_RDONLY));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add open syscall, received libseccomp "
-"error %d", rc);
-return rc;
-  }
-
-  rc = seccomp_rule_add_1(ctx, SCMP_ACT_ERRNO(EACCES), SCMP_SYS(openat),
-SCMP_CMP_MASKED(2, O_CLOEXEC|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW,
-O_RDONLY));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add openat syscall, received "
-"libseccomp error %d", rc);
-return rc;
-  }
-
   return 0;
 }
 
@@ -562,23 +544,6 @@ sb_chown(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
   return 0;
 }
 
-static int
-sb__sysctl(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
-{
-  int rc;
-  (void) filter;
-  (void) ctx;
-
-  rc = seccomp_rule_add_0(ctx, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(_sysctl));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add _sysctl syscall, "
-"received libseccomp error %d", rc);
-return rc;
-  }
-
-  return 0;
-}
-
 /**
  * Function responsible for setting up the rename syscall for
  * the seccomp filter sandbox.
@@ -1141,7 +1106,6 @@ static sandbox_filter_func_t filter_func[] = {
 sb_chmod,
 sb_open,
 sb_openat,
-sb__sysctl,
 sb_rename,
 #ifdef __NR_fcntl64
 sb_fcntl64,
@@ -1518,14 +1482,14 @@ install_syscall_filter(sandbox_cfg_t* cfg)
   int rc = 0;
   scmp_filter_ctx ctx;
 
-  ctx = seccomp_init(SCMP_ACT_TRAP);
+  ctx = seccomp_init(SCMP_ACT_ERRNO(EPERM));
   if (ctx == NULL) {
 log_err(LD_BUG,"(Sandbox) failed to initialise libseccomp context");
 rc = -1;
 goto end;
   }
 
-  // protectign sandbox parameter strings
+  // protecting sandbox parameter strings
   if ((rc = prot_strings(ctx, cfg))) {
 goto end;
   }



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.4.2] Merge branch 'maint-0.4.0' into maint-0.4.1

2020-01-29 Thread teor
commit 6b392c333a854bb4d18ae6ea1686627451bb03f8
Merge: 9b0b2aef8 65825018c
Author: teor 
Date:   Thu Jan 30 07:55:05 2020 +1000

Merge branch 'maint-0.4.0' into maint-0.4.1

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.4.1] Merge branch 'maint-0.4.0' into maint-0.4.1

2020-01-29 Thread teor
commit 6b392c333a854bb4d18ae6ea1686627451bb03f8
Merge: 9b0b2aef8 65825018c
Author: teor 
Date:   Thu Jan 30 07:55:05 2020 +1000

Merge branch 'maint-0.4.0' into maint-0.4.1

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.4.1] Merge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5

2020-01-29 Thread teor
commit 41d52e9cd80bfb318ec7f0969f3889d275012e37
Merge: 19954cffd 0d64bafcf
Author: teor 
Date:   Thu Jan 30 07:53:53 2020 +1000

Merge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.4.0] Merge branch 'maint-0.3.5' into maint-0.4.0

2020-01-29 Thread teor
commit 65825018c7aed931324dd427bb1e84544a9b2f47
Merge: 026f068bb 41d52e9cd
Author: teor 
Date:   Thu Jan 30 07:54:58 2020 +1000

Merge branch 'maint-0.3.5' into maint-0.4.0

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.4.1] Initialize publish/subscribe code when running as an NT service.

2020-01-29 Thread teor
commit 54eec5342d45e9add5b9a8fee0167267c38f63f9
Author: Nick Mathewson 
Date:   Mon Jan 6 08:45:29 2020 -0500

Initialize publish/subscribe code when running as an NT service.

Fixes bug 32778; bugfix on 0.4.1.1-alpha.
---
 changes/bug32778  | 3 +++
 src/app/main/main.c   | 4 ++--
 src/app/main/main.h   | 3 +++
 src/app/main/ntmain.c | 7 +++
 4 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/changes/bug32778 b/changes/bug32778
new file mode 100644
index 0..ccb610469
--- /dev/null
+++ b/changes/bug32778
@@ -0,0 +1,3 @@
+  o Minor bugfixes (windows service):
+- Initialize publish/subscribe system when running as a windows service.
+  Fixes bug 32778; bugfix on 0.4.1.1-alpha.
diff --git a/src/app/main/main.c b/src/app/main/main.c
index 6e325f0b1..f3772f86e 100644
--- a/src/app/main/main.c
+++ b/src/app/main/main.c
@@ -1236,7 +1236,7 @@ run_tor_main_loop(void)
 }
 
 /** Install the publish/subscribe relationships for all the subsystems. */
-static void
+void
 pubsub_install(void)
 {
 pubsub_builder_t *builder = pubsub_builder_new();
@@ -1248,7 +1248,7 @@ pubsub_install(void)
 
 /** Connect the mainloop to its publish/subscribe message delivery events if
  * appropriate, and configure the global channels appropriately. */
-static void
+void
 pubsub_connect(void)
 {
   if (get_options()->command == CMD_RUN_TOR) {
diff --git a/src/app/main/main.h b/src/app/main/main.h
index 9dfaf4b8e..76574a907 100644
--- a/src/app/main/main.h
+++ b/src/app/main/main.h
@@ -25,4 +25,7 @@ int tor_init(int argc, char **argv);
 
 int run_tor_main_loop(void);
 
+void pubsub_install(void);
+void pubsub_connect(void);
+
 #endif /* !defined(TOR_MAIN_H) */
diff --git a/src/app/main/ntmain.c b/src/app/main/ntmain.c
index f00b71270..c5a812203 100644
--- a/src/app/main/ntmain.c
+++ b/src/app/main/ntmain.c
@@ -283,7 +283,9 @@ nt_service_body(int argc, char **argv)
 return;
   }
 
+  pubsub_install();
   r = tor_init(backup_argc, backup_argv);
+
   if (r) {
 /* Failed to start the Tor service */
 r = NT_SERVICE_ERROR_TORINIT_FAILED;
@@ -294,6 +296,8 @@ nt_service_body(int argc, char **argv)
 return;
   }
 
+  pubsub_connect();
+
   /* Set the service's status to SERVICE_RUNNING and start the main
* event loop */
   service_status.dwCurrentState = SERVICE_RUNNING;
@@ -322,9 +326,12 @@ nt_service_main(void)
 errmsg = format_win32_error(result);
 printf("Service error %d : %s\n", (int) result, errmsg);
 tor_free(errmsg);
+
+pubsub_install();
 if (result == ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) {
   if (tor_init(backup_argc, backup_argv))
 return;
+  pubsub_connect();
   switch (get_options()->command) {
   case CMD_RUN_TOR:
 run_tor_main_loop();



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.4.0] Merge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5

2020-01-29 Thread teor
commit 41d52e9cd80bfb318ec7f0969f3889d275012e37
Merge: 19954cffd 0d64bafcf
Author: teor 
Date:   Thu Jan 30 07:53:53 2020 +1000

Merge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.5] Merge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5

2020-01-29 Thread teor
commit 41d52e9cd80bfb318ec7f0969f3889d275012e37
Merge: 19954cffd 0d64bafcf
Author: teor 
Date:   Thu Jan 30 07:53:53 2020 +1000

Merge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.5] Correct how we use libseccomp

2020-01-29 Thread teor
commit 0d64bafcfedd259fb15b3ee85a7b00a840aec73b
Author: Peter Gerber 
Date:   Mon Jun 10 14:56:31 2019 +0200

Correct how we use libseccomp

This fixes a startup crash with libseccomp v2.4.0 if Sandbox is
set to 1.
---
 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)

diff --git a/changes/bug29819 b/changes/bug29819
new file mode 100644
index 0..d37ac83d6
--- /dev/null
+++ b/changes/bug29819
@@ -0,0 +1,8 @@
+  o Minor bugfixes (linux seccomp sandbox):
+- Correct how we use libseccomp. Particularly, stop assuming that
+  rules are applied in a particular order or that more rules are
+  processed after the first match. Neither is the case! In libseccomp
+  <2.4.0 this lead to some rules having no effect. Libseccomp 2.4.0
+  changed how rules are generated leading to a different ordering
+  which in turn lead to a fatal crash during startup. Fixes bug
+  29819; bugfix on 0.2.5.1-alpha. Patch by Peter Gerber.
diff --git a/src/lib/sandbox/sandbox.c b/src/lib/sandbox/sandbox.c
index e2356a172..8f577b066 100644
--- a/src/lib/sandbox/sandbox.c
+++ b/src/lib/sandbox/sandbox.c
@@ -491,24 +491,6 @@ sb_open(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
 }
   }
 
-  rc = seccomp_rule_add_1(ctx, SCMP_ACT_ERRNO(EACCES), SCMP_SYS(open),
-SCMP_CMP_MASKED(1, O_CLOEXEC|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW,
-O_RDONLY));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add open syscall, received libseccomp "
-"error %d", rc);
-return rc;
-  }
-
-  rc = seccomp_rule_add_1(ctx, SCMP_ACT_ERRNO(EACCES), SCMP_SYS(openat),
-SCMP_CMP_MASKED(2, O_CLOEXEC|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW,
-O_RDONLY));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add openat syscall, received "
-"libseccomp error %d", rc);
-return rc;
-  }
-
   return 0;
 }
 
@@ -562,23 +544,6 @@ sb_chown(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
   return 0;
 }
 
-static int
-sb__sysctl(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
-{
-  int rc;
-  (void) filter;
-  (void) ctx;
-
-  rc = seccomp_rule_add_0(ctx, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(_sysctl));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add _sysctl syscall, "
-"received libseccomp error %d", rc);
-return rc;
-  }
-
-  return 0;
-}
-
 /**
  * Function responsible for setting up the rename syscall for
  * the seccomp filter sandbox.
@@ -1141,7 +1106,6 @@ static sandbox_filter_func_t filter_func[] = {
 sb_chmod,
 sb_open,
 sb_openat,
-sb__sysctl,
 sb_rename,
 #ifdef __NR_fcntl64
 sb_fcntl64,
@@ -1518,14 +1482,14 @@ install_syscall_filter(sandbox_cfg_t* cfg)
   int rc = 0;
   scmp_filter_ctx ctx;
 
-  ctx = seccomp_init(SCMP_ACT_TRAP);
+  ctx = seccomp_init(SCMP_ACT_ERRNO(EPERM));
   if (ctx == NULL) {
 log_err(LD_BUG,"(Sandbox) failed to initialise libseccomp context");
 rc = -1;
 goto end;
   }
 
-  // protectign sandbox parameter strings
+  // protecting sandbox parameter strings
   if ((rc = prot_strings(ctx, cfg))) {
 goto end;
   }



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.4.0] Correct how we use libseccomp

2020-01-29 Thread teor
commit 0d64bafcfedd259fb15b3ee85a7b00a840aec73b
Author: Peter Gerber 
Date:   Mon Jun 10 14:56:31 2019 +0200

Correct how we use libseccomp

This fixes a startup crash with libseccomp v2.4.0 if Sandbox is
set to 1.
---
 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)

diff --git a/changes/bug29819 b/changes/bug29819
new file mode 100644
index 0..d37ac83d6
--- /dev/null
+++ b/changes/bug29819
@@ -0,0 +1,8 @@
+  o Minor bugfixes (linux seccomp sandbox):
+- Correct how we use libseccomp. Particularly, stop assuming that
+  rules are applied in a particular order or that more rules are
+  processed after the first match. Neither is the case! In libseccomp
+  <2.4.0 this lead to some rules having no effect. Libseccomp 2.4.0
+  changed how rules are generated leading to a different ordering
+  which in turn lead to a fatal crash during startup. Fixes bug
+  29819; bugfix on 0.2.5.1-alpha. Patch by Peter Gerber.
diff --git a/src/lib/sandbox/sandbox.c b/src/lib/sandbox/sandbox.c
index e2356a172..8f577b066 100644
--- a/src/lib/sandbox/sandbox.c
+++ b/src/lib/sandbox/sandbox.c
@@ -491,24 +491,6 @@ sb_open(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
 }
   }
 
-  rc = seccomp_rule_add_1(ctx, SCMP_ACT_ERRNO(EACCES), SCMP_SYS(open),
-SCMP_CMP_MASKED(1, O_CLOEXEC|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW,
-O_RDONLY));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add open syscall, received libseccomp "
-"error %d", rc);
-return rc;
-  }
-
-  rc = seccomp_rule_add_1(ctx, SCMP_ACT_ERRNO(EACCES), SCMP_SYS(openat),
-SCMP_CMP_MASKED(2, O_CLOEXEC|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW,
-O_RDONLY));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add openat syscall, received "
-"libseccomp error %d", rc);
-return rc;
-  }
-
   return 0;
 }
 
@@ -562,23 +544,6 @@ sb_chown(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
   return 0;
 }
 
-static int
-sb__sysctl(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
-{
-  int rc;
-  (void) filter;
-  (void) ctx;
-
-  rc = seccomp_rule_add_0(ctx, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(_sysctl));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add _sysctl syscall, "
-"received libseccomp error %d", rc);
-return rc;
-  }
-
-  return 0;
-}
-
 /**
  * Function responsible for setting up the rename syscall for
  * the seccomp filter sandbox.
@@ -1141,7 +1106,6 @@ static sandbox_filter_func_t filter_func[] = {
 sb_chmod,
 sb_open,
 sb_openat,
-sb__sysctl,
 sb_rename,
 #ifdef __NR_fcntl64
 sb_fcntl64,
@@ -1518,14 +1482,14 @@ install_syscall_filter(sandbox_cfg_t* cfg)
   int rc = 0;
   scmp_filter_ctx ctx;
 
-  ctx = seccomp_init(SCMP_ACT_TRAP);
+  ctx = seccomp_init(SCMP_ACT_ERRNO(EPERM));
   if (ctx == NULL) {
 log_err(LD_BUG,"(Sandbox) failed to initialise libseccomp context");
 rc = -1;
 goto end;
   }
 
-  // protectign sandbox parameter strings
+  // protecting sandbox parameter strings
   if ((rc = prot_strings(ctx, cfg))) {
 goto end;
   }



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.4.1] Correct how we use libseccomp

2020-01-29 Thread teor
commit 0d64bafcfedd259fb15b3ee85a7b00a840aec73b
Author: Peter Gerber 
Date:   Mon Jun 10 14:56:31 2019 +0200

Correct how we use libseccomp

This fixes a startup crash with libseccomp v2.4.0 if Sandbox is
set to 1.
---
 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)

diff --git a/changes/bug29819 b/changes/bug29819
new file mode 100644
index 0..d37ac83d6
--- /dev/null
+++ b/changes/bug29819
@@ -0,0 +1,8 @@
+  o Minor bugfixes (linux seccomp sandbox):
+- Correct how we use libseccomp. Particularly, stop assuming that
+  rules are applied in a particular order or that more rules are
+  processed after the first match. Neither is the case! In libseccomp
+  <2.4.0 this lead to some rules having no effect. Libseccomp 2.4.0
+  changed how rules are generated leading to a different ordering
+  which in turn lead to a fatal crash during startup. Fixes bug
+  29819; bugfix on 0.2.5.1-alpha. Patch by Peter Gerber.
diff --git a/src/lib/sandbox/sandbox.c b/src/lib/sandbox/sandbox.c
index e2356a172..8f577b066 100644
--- a/src/lib/sandbox/sandbox.c
+++ b/src/lib/sandbox/sandbox.c
@@ -491,24 +491,6 @@ sb_open(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
 }
   }
 
-  rc = seccomp_rule_add_1(ctx, SCMP_ACT_ERRNO(EACCES), SCMP_SYS(open),
-SCMP_CMP_MASKED(1, O_CLOEXEC|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW,
-O_RDONLY));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add open syscall, received libseccomp "
-"error %d", rc);
-return rc;
-  }
-
-  rc = seccomp_rule_add_1(ctx, SCMP_ACT_ERRNO(EACCES), SCMP_SYS(openat),
-SCMP_CMP_MASKED(2, O_CLOEXEC|O_NONBLOCK|O_NOCTTY|O_NOFOLLOW,
-O_RDONLY));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add openat syscall, received "
-"libseccomp error %d", rc);
-return rc;
-  }
-
   return 0;
 }
 
@@ -562,23 +544,6 @@ sb_chown(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
   return 0;
 }
 
-static int
-sb__sysctl(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
-{
-  int rc;
-  (void) filter;
-  (void) ctx;
-
-  rc = seccomp_rule_add_0(ctx, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(_sysctl));
-  if (rc != 0) {
-log_err(LD_BUG,"(Sandbox) failed to add _sysctl syscall, "
-"received libseccomp error %d", rc);
-return rc;
-  }
-
-  return 0;
-}
-
 /**
  * Function responsible for setting up the rename syscall for
  * the seccomp filter sandbox.
@@ -1141,7 +1106,6 @@ static sandbox_filter_func_t filter_func[] = {
 sb_chmod,
 sb_open,
 sb_openat,
-sb__sysctl,
 sb_rename,
 #ifdef __NR_fcntl64
 sb_fcntl64,
@@ -1518,14 +1482,14 @@ install_syscall_filter(sandbox_cfg_t* cfg)
   int rc = 0;
   scmp_filter_ctx ctx;
 
-  ctx = seccomp_init(SCMP_ACT_TRAP);
+  ctx = seccomp_init(SCMP_ACT_ERRNO(EPERM));
   if (ctx == NULL) {
 log_err(LD_BUG,"(Sandbox) failed to initialise libseccomp context");
 rc = -1;
 goto end;
   }
 
-  // protectign sandbox parameter strings
+  // protecting sandbox parameter strings
   if ((rc = prot_strings(ctx, cfg))) {
 goto end;
   }



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.3.5' into maint-0.4.0

2020-01-29 Thread teor
commit 65825018c7aed931324dd427bb1e84544a9b2f47
Merge: 026f068bb 41d52e9cd
Author: teor 
Date:   Thu Jan 30 07:54:58 2020 +1000

Merge branch 'maint-0.3.5' into maint-0.4.0

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.4.0' into maint-0.4.1

2020-01-29 Thread teor
commit 6b392c333a854bb4d18ae6ea1686627451bb03f8
Merge: 9b0b2aef8 65825018c
Author: teor 
Date:   Thu Jan 30 07:55:05 2020 +1000

Merge branch 'maint-0.4.0' into maint-0.4.1

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge remote-tracking branch 'tor-github/pr/1634' into maint-0.4.1

2020-01-29 Thread teor
commit 9b0b2aef806c5d9bcb5e5acd4b4c3cf7488ec442
Merge: fb541ffca 54eec5342
Author: teor 
Date:   Thu Jan 30 07:54:39 2020 +1000

Merge remote-tracking branch 'tor-github/pr/1634' into maint-0.4.1

 changes/bug32778  | 3 +++
 src/app/main/main.c   | 4 ++--
 src/app/main/main.h   | 3 +++
 src/app/main/ntmain.c | 7 +++
 4 files changed, 15 insertions(+), 2 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.4.2'

2020-01-29 Thread teor
commit c1d4399c82d7a04e6c89487d76e07f2304fe55d2
Merge: 99671c0da 7b6be02a9
Author: teor 
Date:   Thu Jan 30 07:55:20 2020 +1000

Merge branch 'maint-0.4.2'

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5

2020-01-29 Thread teor
commit 41d52e9cd80bfb318ec7f0969f3889d275012e37
Merge: 19954cffd 0d64bafcf
Author: teor 
Date:   Thu Jan 30 07:53:53 2020 +1000

Merge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5

 changes/bug29819  |  8 
 src/lib/sandbox/sandbox.c | 40 ++--
 2 files changed, 10 insertions(+), 38 deletions(-)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.4.1' into maint-0.4.2

2020-01-29 Thread teor
commit 7b6be02a923075ec3966d967cca26eb8d16b645e
Merge: 48187248d 6b392c333
Author: teor 
Date:   Thu Jan 30 07:55:12 2020 +1000

Merge branch 'maint-0.4.1' into maint-0.4.2

 changes/bug29819  |  8 
 changes/bug32778  |  3 +++
 src/app/main/main.c   |  4 ++--
 src/app/main/main.h   |  3 +++
 src/app/main/ntmain.c |  7 +++
 src/lib/sandbox/sandbox.c | 40 ++--
 6 files changed, 25 insertions(+), 40 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [snowflake/master] Remove client test with nil broker

2020-01-29 Thread dcf
commit 50673d49437c55aba2a5f7f31819bcae60406b07
Author: Cecylia Bocovich 
Date:   Wed Jan 29 11:40:29 2020 -0500

Remove client test with nil broker

We are no longer checking for nil BrokerChannels in Catch because this
case is caught from the return values of NewBrokerChannel. This change
caused a no longer necessary unit test to hang.
---
 client/lib/lib_test.go | 6 --
 1 file changed, 6 deletions(-)

diff --git a/client/lib/lib_test.go b/client/lib/lib_test.go
index d48c301..91a9809 100644
--- a/client/lib/lib_test.go
+++ b/client/lib/lib_test.go
@@ -271,12 +271,6 @@ func TestSnowflakeClient(t *testing.T) {
So(d.BrokerChannel, ShouldNotBeNil)
So(d.BrokerChannel.Host, ShouldEqual, "test")
})
-   Convey("WebRTCDialer cannot Catch a snowflake with nil 
broker.", func() {
-   d := NewWebRTCDialer(nil, nil)
-   conn, err := d.Catch()
-   So(conn, ShouldBeNil)
-   So(err, ShouldNotBeNil)
-   })
SkipConvey("WebRTCDialer can Catch a snowflake.", func() {
broker := {Host: "test"}
d := NewWebRTCDialer(broker, nil)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [snowflake/master] Update client tests for NewBrokerChannel errors

2020-01-29 Thread dcf
commit 7682986a451deb3a4d28240fa7d8b06ed5d7a5dd
Author: Cecylia Bocovich 
Date:   Wed Jan 29 11:27:44 2020 -0500

Update client tests for NewBrokerChannel errors

We changed NewBrokerChannel to return an error value on failure. This
updates the tests to check that value.
---
 client/lib/lib_test.go | 21 ++---
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/client/lib/lib_test.go b/client/lib/lib_test.go
index 12368f3..d48c301 100644
--- a/client/lib/lib_test.go
+++ b/client/lib/lib_test.go
@@ -294,22 +294,25 @@ func TestSnowflakeClient(t *testing.T) {
fakeOffer := 
deserializeSessionDescription(`{"type":"offer","sdp":"test"}`)
 
Convey("Construct BrokerChannel with no front domain", func() {
-   b := NewBrokerChannel("test.broker", "", transport)
+   b, err := NewBrokerChannel("test.broker", "", transport)
So(b.url, ShouldNotBeNil)
+   So(err, ShouldBeNil)
So(b.url.Path, ShouldResemble, "test.broker")
So(b.transport, ShouldNotBeNil)
})
 
Convey("Construct BrokerChannel *with* front domain", func() {
-   b := NewBrokerChannel("test.broker", "front", transport)
+   b, err := NewBrokerChannel("test.broker", "front", 
transport)
So(b.url, ShouldNotBeNil)
+   So(err, ShouldBeNil)
So(b.url.Path, ShouldResemble, "test.broker")
So(b.url.Host, ShouldResemble, "front")
So(b.transport, ShouldNotBeNil)
})
 
Convey("BrokerChannel.Negotiate responds with answer", func() {
-   b := NewBrokerChannel("test.broker", "", transport)
+   b, err := NewBrokerChannel("test.broker", "", transport)
+   So(err, ShouldBeNil)
answer, err := b.Negotiate(fakeOffer)
So(err, ShouldBeNil)
So(answer, ShouldNotBeNil)
@@ -317,8 +320,9 @@ func TestSnowflakeClient(t *testing.T) {
})
 
Convey("BrokerChannel.Negotiate fails with 503", func() {
-   b := NewBrokerChannel("test.broker", "",
+   b, err := NewBrokerChannel("test.broker", "",
{http.StatusServiceUnavailable, 
[]byte("\n")})
+   So(err, ShouldBeNil)
answer, err := b.Negotiate(fakeOffer)
So(err, ShouldNotBeNil)
So(answer, ShouldBeNil)
@@ -326,8 +330,9 @@ func TestSnowflakeClient(t *testing.T) {
})
 
Convey("BrokerChannel.Negotiate fails with 400", func() {
-   b := NewBrokerChannel("test.broker", "",
+   b, err := NewBrokerChannel("test.broker", "",
{http.StatusBadRequest, 
[]byte("\n")})
+   So(err, ShouldBeNil)
answer, err := b.Negotiate(fakeOffer)
So(err, ShouldNotBeNil)
So(answer, ShouldBeNil)
@@ -335,8 +340,9 @@ func TestSnowflakeClient(t *testing.T) {
})
 
Convey("BrokerChannel.Negotiate fails with large read", func() {
-   b := NewBrokerChannel("test.broker", "",
+   b, err := NewBrokerChannel("test.broker", "",
{http.StatusOK, make([]byte, 
11, 11)})
+   So(err, ShouldBeNil)
answer, err := b.Negotiate(fakeOffer)
So(err, ShouldNotBeNil)
So(answer, ShouldBeNil)
@@ -344,8 +350,9 @@ func TestSnowflakeClient(t *testing.T) {
})
 
Convey("BrokerChannel.Negotiate fails with unexpected error", 
func() {
-   b := NewBrokerChannel("test.broker", "",
+   b, err := NewBrokerChannel("test.broker", "",
{123, []byte("")})
+   So(err, ShouldBeNil)
answer, err := b.Negotiate(fakeOffer)
So(err, ShouldNotBeNil)
So(answer, ShouldBeNil)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits