Trac issueshttps://gitlab.torproject.org/legacy/trac/-/issues2020-06-13T15:38:53Zhttps://gitlab.torproject.org/legacy/trac/-/issues/29643Fix an incorrect comment about calling FreeLibrary()2020-06-13T15:38:53ZteorFix an incorrect comment about calling FreeLibrary()There's an incorrect comment in compat_time.c about calling FreeLibrary().
See #29642 for background.There's an incorrect comment in compat_time.c about calling FreeLibrary().
See #29642 for background.Tor: 0.4.0.x-finalteorteorhttps://gitlab.torproject.org/legacy/trac/-/issues/29161Expect some gmtime/localtime() failures on windows, don't log bugs from tests.2020-06-13T15:37:10ZNick MathewsonExpect some gmtime/localtime() failures on windows, don't log bugs from tests.Tor: 0.4.0.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/29160do not LOG_ERR from test_address_get_if_addrs6 when there is no ipv62020-06-13T15:37:10ZNick Mathewsondo not LOG_ERR from test_address_get_if_addrs6 when there is no ipv6Part of parent: fix a current LOG_ERR case.Part of parent: fix a current LOG_ERR case.Tor: 0.4.0.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/28058Run shellcheck as part of "make check"2020-06-13T15:40:56ZteorRun shellcheck as part of "make check"To avoid introducing shell script issues into Tor, we could run shellcheck (https://github.com/koalaman/shellcheck) as part of "make check".
Since this is a technical debt check, I am tentatively assigning it to 0.3.6.To avoid introducing shell script issues into Tor, we could run shellcheck (https://github.com/koalaman/shellcheck) as part of "make check".
Since this is a technical debt check, I am tentatively assigning it to 0.3.6.Tor: 0.4.0.x-finalrl1987rl1987https://gitlab.torproject.org/legacy/trac/-/issues/28012shellcheck: updateRustDependencies.sh issues2020-06-13T15:32:45Zrl1987shellcheck: updateRustDependencies.sh issuesShellcheck (https://github.com/koalaman/shellcheck) finds the following issues:
```
In updateRustDependencies.sh line 23:
HERE=`dirname $(realpath $0)`
^-- SC2006: Use $(..) instead of legacy `..`.
^-- SC2046:...Shellcheck (https://github.com/koalaman/shellcheck) finds the following issues:
```
In updateRustDependencies.sh line 23:
HERE=`dirname $(realpath $0)`
^-- SC2006: Use $(..) instead of legacy `..`.
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In updateRustDependencies.sh line 24:
TOPLEVEL=`dirname $(dirname $HERE)`
^-- SC2006: Use $(..) instead of legacy `..`.
^-- SC2046: Quote this to prevent word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In updateRustDependencies.sh line 27:
CARGO=`which cargo`
^-- SC2006: Use $(..) instead of legacy `..`.
^-- SC2230: which is non-standard. Use builtin 'command -v' instead.
In updateRustDependencies.sh line 30:
printf "Error: Couldn't find workspace Cargo.toml in expected location: %s\n" "$TOML"
^-- SC1117: Backslash is literal in "\n". Prefer explicit escaping: "\\n".
In updateRustDependencies.sh line 34:
printf "Error: Couldn't find directory for Rust dependencies! Expected location: %s\n" "$VENDORED"
^-- SC1117: Backslash is literal in "\n". Prefer explicit escaping: "\\n".
In updateRustDependencies.sh line 38:
printf "Error: cargo must be installed and in your \$PATH\n"
^-- SC1117: Backslash is literal in "\n". Prefer explicit escaping: "\\n".
In updateRustDependencies.sh line 41:
if test -z `cargo --list | grep vendor` ; then
^-- SC2046: Quote this to prevent word splitting.
^-- SC2006: Use $(..) instead of legacy `..`.
In updateRustDependencies.sh line 42:
printf "Error: cargo-vendor not installed\n"
^-- SC1117: Backslash is literal in "\n". Prefer explicit escaping: "\\n".
In updateRustDependencies.sh line 45:
$CARGO vendor -v --locked --explicit-version --no-delete --sync $TOML $VENDORED
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
```Tor: 0.4.0.x-finalhttps://gitlab.torproject.org/legacy/trac/-/issues/28011shellcheck: run_calltool.sh issues2020-06-13T15:32:44Zrl1987shellcheck: run_calltool.sh issuesShellcheck (https://github.com/koalaman/shellcheck) finds the following issues:
```
In run_calltool.sh line 18:
python -m calltool $calculation > callgraph/$calculation
^-- SC2086: Double quote to prevent glo...Shellcheck (https://github.com/koalaman/shellcheck) finds the following issues:
```
In run_calltool.sh line 18:
python -m calltool $calculation > callgraph/$calculation
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In run_calltool.sh line 21:
echo <<EOF > callgraph/README
^-- SC2217: Redirecting to 'echo', a command that doesn't read stdin. Bad quoting or missing xargs?
```Tor: 0.4.0.x-finalrl1987rl1987https://gitlab.torproject.org/legacy/trac/-/issues/28010shellcheck: run_trunnel.sh issues2020-06-13T15:32:44Zrl1987shellcheck: run_trunnel.sh issuesShellcheck (https://github.com/koalaman/shellcheck) finds the following issues:
```
In run_trunnel.sh line 12:
for file in `find ./src/trunnel/ -name '*.trunnel'`; do
^-- SC2044: For loops over find output are fragile. ...Shellcheck (https://github.com/koalaman/shellcheck) finds the following issues:
```
In run_trunnel.sh line 12:
for file in `find ./src/trunnel/ -name '*.trunnel'`; do
^-- SC2044: For loops over find output are fragile. Use find -exec or a while read loop.
^-- SC2006: Use $(..) instead of legacy `..`.
In run_trunnel.sh line 13:
python -m trunnel ${OPTIONS} $file
^-- SC2086: Double quote to prevent globbing and word splitting.
```Tor: 0.4.0.x-finalrl1987rl1987https://gitlab.torproject.org/legacy/trac/-/issues/28009shellcheck: cov-diff issues2020-06-13T15:32:44Zrl1987shellcheck: cov-diff issuesShellcheck (https://github.com/koalaman/shellcheck) finds the following issues:
```
In cov-diff line 10:
for B in $DIRB/*; do
^-- SC2231: Quote expansions in this for loop glob to prevent wordsplitting, e.g. "$dir"/*.txt .
...Shellcheck (https://github.com/koalaman/shellcheck) finds the following issues:
```
In cov-diff line 10:
for B in $DIRB/*; do
^-- SC2231: Quote expansions in this for loop glob to prevent wordsplitting, e.g. "$dir"/*.txt .
In cov-diff line 11:
A=$DIRA/`basename $B`
^-- SC2006: Use $(..) instead of legacy `..`.
^-- SC2086: Double quote to prevent globbing and word splitting.
In cov-diff line 12:
if [ -f $A ]; then
^-- SC2086: Double quote to prevent globbing and word splitting.
```Tor: 0.4.0.x-finalhttps://gitlab.torproject.org/legacy/trac/-/issues/28008shellcheck: coverage script issues2020-06-13T15:32:43Zrl1987shellcheck: coverage script issuesShellcheck (https://github.com/koalaman/shellcheck) finds the following issues:
```
In coverage line 11:
BN=`basename $fn`
^-- SC2006: Use $(..) instead of legacy `..`.
^-- SC2086: Double quote to prevent ...Shellcheck (https://github.com/koalaman/shellcheck) finds the following issues:
```
In coverage line 11:
BN=`basename $fn`
^-- SC2006: Use $(..) instead of legacy `..`.
^-- SC2086: Double quote to prevent globbing and word splitting.
In coverage line 12:
DN=`dirname $fn`
^-- SC2006: Use $(..) instead of legacy `..`.
^-- SC2086: Double quote to prevent globbing and word splitting.
In coverage line 13:
F=`echo $BN | sed -e 's/\.c$//;'`
^-- SC2006: Use $(..) instead of legacy `..`.
^-- SC2086: Double quote to prevent globbing and word splitting.
In coverage line 16:
ONS=`echo ${DN}/src_*-${F}.o`
^-- SC2006: Use $(..) instead of legacy `..`.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In coverage line 23:
GCNO=`echo $on | sed -e 's/\.o$/\.gcno/;'`
^-- SC2006: Use $(..) instead of legacy `..`.
^-- SC2086: Double quote to prevent globbing and word splitting.
In coverage line 24:
if [ -e $GCNO ]
^-- SC2086: Double quote to prevent globbing and word splitting.
In coverage line 28:
rm -f $GC
^-- SC2086: Double quote to prevent globbing and word splitting.
In coverage line 29:
gcov -o $on $fn
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In coverage line 30:
if [ -e $GC ]
^-- SC2086: Double quote to prevent globbing and word splitting.
In coverage line 34:
mv $GC $dst/$GC
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
```Tor: 0.4.0.x-finalhttps://gitlab.torproject.org/legacy/trac/-/issues/27993craft a git pre push hook that declines to receive fixup! commits?2020-06-13T15:32:36ZRoger Dingledinecraft a git pre push hook that declines to receive fixup! commits?Every so often I see nickm push a commit to tor's main git that is a fixup! commit. It's clear that he meant to squash them before the push but didn't.
Is there some one-liner or something we can put in a git hook that notices these uni...Every so often I see nickm push a commit to tor's main git that is a fixup! commit. It's clear that he meant to squash them before the push but didn't.
Is there some one-liner or something we can put in a git hook that notices these unintended commits and tells us to fix them before pushing?Tor: 0.4.0.x-finalrl1987rl1987https://gitlab.torproject.org/legacy/trac/-/issues/27929Consider no longer calling routerlist_remove_old_routers() from check_descrip...2020-06-13T15:32:25Zrl1987Consider no longer calling routerlist_remove_old_routers() from check_descriptor_callback()```
2237 /* Remove dead routers. */
2238 /* XXXX This doesn't belong here, but it was here in the pre-
2239 * XXXX refactoring code. */
2240 routerlist_remove_old_routers();
2241 }
```
We should see if there's better ...```
2237 /* Remove dead routers. */
2238 /* XXXX This doesn't belong here, but it was here in the pre-
2239 * XXXX refactoring code. */
2240 routerlist_remove_old_routers();
2241 }
```
We should see if there's better place to call this function from.Tor: 0.4.0.x-finalhttps://gitlab.torproject.org/legacy/trac/-/issues/21900evdns fails when resolv.conf is missing, but succeeds when resolv.conf is empty2020-06-13T15:07:44Zteorevdns fails when resolv.conf is missing, but succeeds when resolv.conf is emptyWhen tor's ServerDNSResolvConfFile (default /etc/resolv.conf) is missing, evdns does not add any name servers, and therefore Exits do not allow any exit traffic (not even IP-based traffic):
```
[debug] configure_nameservers: stat()ing /e...When tor's ServerDNSResolvConfFile (default /etc/resolv.conf) is missing, evdns does not add any name servers, and therefore Exits do not allow any exit traffic (not even IP-based traffic):
```
[debug] configure_nameservers: stat()ing /etc/resolv.conf
[warn] Unable to stat resolver configuration in '/etc/resolv.conf': No such file or directory
[info] mark_my_descriptor_dirty: Decided to publish new relay descriptor: dns resolvers failed
```
This happens on macOS when the network is down. On macOS, /etc/resolv.conf is symlinked to /var/run/resolv.conf. When the network is down, macOS deletes /var/run/resolv.conf, so the stat() call on /etc/resolv.conf fails.
But when tor's ServerDNSResolvConfFile is empty, evdns adds a default name server (127.0.0.1:53 on my macOS), and therefore Exits allow exit traffic:
```
[info] eventdns: Parsing resolv.conf file /dev/null
[info] eventdns: Added nameserver 127.0.0.1:53 as 0x615000009e00
[info] mark_my_descriptor_dirty: Decided to publish new relay descriptor: dns resolvers failed
[info] eventdns: Parsing resolv.conf file /dev/null
...
[info] mark_my_descriptor_dirty: Decided to publish new relay descriptor: dns resolvers back
```
We should also stop the extra descriptor upload:
```
[info] mark_my_descriptor_dirty: Decided to publish new relay descriptor: dns resolvers failed
```Tor: 0.4.0.x-finalrl1987rl1987