Skip to content

v0.5.3

Choose a tag to compare

@richlegrand richlegrand released this 09 Nov 16:01
· 13 commits to main since this release
351536c

A patch release with one fix, found by @lars18th running a listener on
OpenWRT. 0.5.2 command lines keep working.

Ctrl-C at the PIN prompt no longer leaves the shell broken

Pressing Ctrl-C while bitbang connect waited at PIN: returned you to a
shell that no longer echoed anything you typed. Arrow keys did nothing
visible, and on OpenWRT reset did not bring it back -- busybox's applet
clears the screen without touching the terminal modes, and stty is not
installed by default.

term.ReadPassword clears ECHO and puts the old terminal modes back from a
deferred call, and a process killed by a signal never runs its defers. At that
point in connect nothing had registered for SIGINT yet, so it took the
default disposition and died inside read(2) with ECHO still off.

The prompt now saves the terminal before it reads and restores it from a
signal handler, so Ctrl-C leaves the shell as it found it. cp shares the
same prompt and was affected identically.

On 0.5.2, stty sane typed blind restores the shell -- after installing
coreutils-stty, if you are on OpenWRT.


#49, the access code appearing in a daemon's log, is not in this release.
The first attempt dropped the code whenever stdout was not a terminal, which
also broke every script that reads the URL off stdout -- a pipe is not a
terminal either. It needs to tell a system log apart from a script rather than
a terminal from everything else, and that is a larger change than a patch
release should carry.