From 6eaf27e90d72a6b58342e8a3784e8572c8f96725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Voj=C3=A1=C4=8Dek?= Date: Wed, 21 Nov 2018 22:42:12 +0100 Subject: [PATCH 1/2] force linking against pthreads statically --- process/embedded/tor-0.3.5/process.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process/embedded/tor-0.3.5/process.go b/process/embedded/tor-0.3.5/process.go index 355f8e7..c0bcdde 100644 --- a/process/embedded/tor-0.3.5/process.go +++ b/process/embedded/tor-0.3.5/process.go @@ -24,7 +24,7 @@ import ( #cgo LDFLAGS: -L${SRCDIR}/../../../../tor-static/xz/dist/lib -llzma #cgo LDFLAGS: -L${SRCDIR}/../../../../tor-static/zlib/dist/lib -lz #cgo LDFLAGS: -L${SRCDIR}/../../../../tor-static/openssl/dist/lib -lssl -lcrypto -#cgo windows LDFLAGS: -lws2_32 -lcrypt32 -lgdi32 -liphlpapi +#cgo windows LDFLAGS: -lws2_32 -lcrypt32 -lgdi32 -liphlpapi -Wl,-Bstatic -lpthread #cgo !windows LDFLAGS: -lm #include From ecb62377856167feee5ba658e8cf351dcbc2bb61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 5 Dec 2018 14:04:46 +0200 Subject: [PATCH 2/2] tor: fix folder permission (+x) for auto-created datadir --- tor/tor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tor/tor.go b/tor/tor.go index c0f096e..0edd241 100644 --- a/tor/tor.go +++ b/tor/tor.go @@ -161,7 +161,7 @@ func Start(ctx context.Context, conf *StartConf) (*Tor, error) { } tor.Debugf("Created temp data directory at: %v", tor.DataDir) tor.DeleteDataDirOnClose = !conf.RetainTempDataDir - } else if err := os.MkdirAll(tor.DataDir, 0600); err != nil { + } else if err := os.MkdirAll(tor.DataDir, 0700); err != nil { return nil, fmt.Errorf("Unable to create data dir: %v", err) }