chiark / gitweb /
otter.git
3 years agossh keys update: Log when we find the hardlink situation
Ian Jackson [Mon, 7 Jun 2021 13:53:14 +0000 (14:53 +0100)]
ssh keys update: Log when we find the hardlink situation

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agossh keys update: Mention hardlink approach in error message
Ian Jackson [Mon, 7 Jun 2021 13:43:40 +0000 (14:43 +0100)]
ssh keys update: Mention hardlink approach in error message

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agossh keys update: Allow setting up if static is hardlinked to real
Ian Jackson [Mon, 7 Jun 2021 13:41:31 +0000 (14:41 +0100)]
ssh keys update: Allow setting up if static is hardlinked to real

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agossh keys update: Roorder to support checking for hardlink
Ian Jackson [Mon, 7 Jun 2021 13:32:16 +0000 (14:32 +0100)]
ssh keys update: Roorder to support checking for hardlink

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoconfig, ssh: check that authorized_keys{,_include} is not recursive
Ian Jackson [Mon, 7 Jun 2021 13:29:50 +0000 (14:29 +0100)]
config, ssh: check that authorized_keys{,_include} is not recursive

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoMakefile: check errors from cargo doc
Ian Jackson [Mon, 7 Jun 2021 11:01:20 +0000 (12:01 +0100)]
Makefile: check errors from cargo doc

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoprefs docs: Describe the prefs.toml format in the usage message
Ian Jackson [Mon, 7 Jun 2021 00:39:50 +0000 (01:39 +0100)]
prefs docs: Describe the prefs.toml format in the usage message

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoprefs: Simplify parsing code slightly
Ian Jackson [Mon, 7 Jun 2021 00:07:18 +0000 (01:07 +0100)]
prefs: Simplify parsing code slightly

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoprefs test: Actually test that we can load some prefs
Ian Jackson [Mon, 7 Jun 2021 00:17:55 +0000 (01:17 +0100)]
prefs test: Actually test that we can load some prefs

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoprefs test: Break out ssh_command ds also
Ian Jackson [Mon, 7 Jun 2021 00:12:05 +0000 (01:12 +0100)]
prefs test: Break out ssh_command ds also

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoprefs bugfix: Pass our argv[0] as a synth arg too
Ian Jackson [Mon, 7 Jun 2021 00:13:39 +0000 (01:13 +0100)]
prefs bugfix: Pass our argv[0] as a synth arg too

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoprefs bugfix: Only expect non-option argummnts for main arg parsing
Ian Jackson [Mon, 7 Jun 2021 00:13:35 +0000 (01:13 +0100)]
prefs bugfix: Only expect non-option argummnts for main arg parsing

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: Move ArgumentParser out of RawArgParserContext
Ian Jackson [Sun, 6 Jun 2021 23:54:14 +0000 (00:54 +0100)]
otter cli: Move ArgumentParser out of RawArgParserContext

We need to work with different ones.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoprefs tests: Break out ssh_command, ready for adding a test
Ian Jackson [Sun, 6 Jun 2021 23:21:28 +0000 (00:21 +0100)]
prefs tests: Break out ssh_command, ready for adding a test

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: With -vv, mention skipped nonexistent prefs
Ian Jackson [Sun, 6 Jun 2021 23:20:41 +0000 (00:20 +0100)]
otter cli: With -vv, mention skipped nonexistent prefs

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: Initial prefs support, not debugged
Ian Jackson [Sun, 6 Jun 2021 22:18:53 +0000 (23:18 +0100)]
otter cli: Initial prefs support, not debugged

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoAdd dependency on directories (for xdg directories)
Ian Jackson [Fri, 4 Jun 2021 19:11:23 +0000 (20:11 +0100)]
Add dependency on directories (for xdg directories)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agotoml-de: Do not say it's a config file
Ian Jackson [Mon, 7 Jun 2021 00:07:11 +0000 (01:07 +0100)]
toml-de: Do not say it's a config file

Currently used for specs, will be used for prefs too

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: anyhow::Error for ArgumentParseError without spurious \n
Ian Jackson [Mon, 7 Jun 2021 00:15:17 +0000 (01:15 +0100)]
otter cli: anyhow::Error for ArgumentParseError without spurious \n

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: anyhow::Error printed for ArgumentParseError with .d()
Ian Jackson [Mon, 7 Jun 2021 00:04:31 +0000 (01:04 +0100)]
otter cli: anyhow::Error printed for ArgumentParseError with .d()

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter: Introduce RawArgParserContext
Ian Jackson [Sun, 6 Jun 2021 22:03:22 +0000 (23:03 +0100)]
otter: Introduce RawArgParserContext

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter: Introduce extra_error message hook
Ian Jackson [Sun, 6 Jun 2021 21:49:53 +0000 (22:49 +0100)]
otter: Introduce extra_error message hook

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter: Rework run_ap_completer into argparse_more
Ian Jackson [Sun, 6 Jun 2021 21:28:32 +0000 (22:28 +0100)]
otter: Rework run_ap_completer into argparse_more

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter: Break out ArgumentParseError::report
Ian Jackson [Sun, 6 Jun 2021 21:24:19 +0000 (22:24 +0100)]
otter: Break out ArgumentParseError::report

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter: Fold in a copy of parse_args into main
Ian Jackson [Sun, 6 Jun 2021 21:14:03 +0000 (22:14 +0100)]
otter: Fold in a copy of parse_args into main

This will Do Stuff with prefs.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter: Break up main()'s arg parsing ready for prefs
Ian Jackson [Sun, 6 Jun 2021 21:09:26 +0000 (22:09 +0100)]
otter: Break up main()'s arg parsing ready for prefs

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter: Break out run_ap_completer
Ian Jackson [Sun, 6 Jun 2021 21:04:23 +0000 (22:04 +0100)]
otter: Break out run_ap_completer

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter: Break out run_argparse
Ian Jackson [Sun, 6 Jun 2021 20:58:44 +0000 (21:58 +0100)]
otter: Break out run_argparse

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoscript: Do not multiselect hands (non-moveable pieces)
Ian Jackson [Thu, 3 Jun 2021 00:22:33 +0000 (01:22 +0100)]
script: Do not multiselect hands (non-moveable pieces)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoscript: Sort other ungrabs
Ian Jackson [Thu, 3 Jun 2021 00:10:59 +0000 (01:10 +0100)]
script: Sort other ungrabs

And rename do_ungrab to do_ungrab_1 to make sure we caught them all.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoscript: Sort drag piece list
Ian Jackson [Thu, 3 Jun 2021 00:10:32 +0000 (01:10 +0100)]
script: Sort drag piece list

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoscript: Sort targets for keystrokes
Ian Jackson [Thu, 3 Jun 2021 00:07:56 +0000 (01:07 +0100)]
script: Sort targets for keystrokes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoscript: Provide piece_z_cmp and pieceid_z_cmp
Ian Jackson [Thu, 3 Jun 2021 00:06:34 +0000 (01:06 +0100)]
script: Provide piece_z_cmp and pieceid_z_cmp

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoMove admin.rs out of otter.rs and forgame.rs
Ian Jackson [Wed, 2 Jun 2021 23:13:10 +0000 (00:13 +0100)]
Move admin.rs out of otter.rs and forgame.rs

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoMove ssh key stuff out of otter.rs
Ian Jackson [Wed, 2 Jun 2021 23:09:39 +0000 (00:09 +0100)]
Move ssh key stuff out of otter.rs

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoMove clear-game out of otter.rs
Ian Jackson [Wed, 2 Jun 2021 23:09:27 +0000 (00:09 +0100)]
Move clear-game out of otter.rs

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoMove usebundles.rs out of otter.rs
Ian Jackson [Wed, 2 Jun 2021 23:05:45 +0000 (00:05 +0100)]
Move usebundles.rs out of otter.rs

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoMove adhoc.rs out of otter.rs
Ian Jackson [Wed, 2 Jun 2021 23:04:02 +0000 (00:04 +0100)]
Move adhoc.rs out of otter.rs

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoRename forgame.rs from manipgame.rs
Ian Jackson [Wed, 2 Jun 2021 23:00:25 +0000 (00:00 +0100)]
Rename forgame.rs from manipgame.rs

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoBreak out functions into manipgame.rs
Ian Jackson [Wed, 2 Jun 2021 22:59:39 +0000 (23:59 +0100)]
Break out functions into manipgame.rs

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoMove more to clisupport.rs
Ian Jackson [Wed, 2 Jun 2021 22:57:18 +0000 (23:57 +0100)]
Move more to clisupport.rs

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoBreak out clisupport.rs
Ian Jackson [Wed, 2 Jun 2021 22:56:05 +0000 (23:56 +0100)]
Break out clisupport.rs

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoRename atmain.rs (from apitest/main.rs)
Ian Jackson [Wed, 2 Jun 2021 22:46:02 +0000 (23:46 +0100)]
Rename atmain.rs (from apitest/main.rs)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoBreak out otter-cli into separate cargo package
Ian Jackson [Wed, 2 Jun 2021 18:51:09 +0000 (19:51 +0100)]
Break out otter-cli into separate cargo package

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoscript: sse disconnection: Check the connecting status
Ian Jackson [Wed, 2 Jun 2021 21:30:35 +0000 (22:30 +0100)]
script: sse disconnection: Check the connecting status

Don't produce an error if the browser is reconnecting.  Hopefully it
will be fine soon...

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: When accessing via ssh, make default account be ssh:
Ian Jackson [Wed, 2 Jun 2021 18:04:18 +0000 (19:04 +0100)]
otter cli: When accessing via ssh, make default account be ssh:

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: Change defaulting order of server and account
Ian Jackson [Wed, 2 Jun 2021 18:03:59 +0000 (19:03 +0100)]
otter cli: Change defaulting order of server and account

We're going to need the server to decide the account.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys: Require an option to set ssh keys for a non-ssh: acocunt
Ian Jackson [Wed, 2 Jun 2021 17:57:40 +0000 (18:57 +0100)]
sshkeys: Require an option to set ssh keys for a non-ssh: acocunt

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoMore sophisticated handling of program name
Ian Jackson [Wed, 2 Jun 2021 17:50:23 +0000 (18:50 +0100)]
More sophisticated handling of program name

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys: Tests restricted command branch sawing
Ian Jackson [Wed, 2 Jun 2021 17:05:59 +0000 (18:05 +0100)]
sshkeys: Tests restricted command branch sawing

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys: Tests a restricted command, refactor
Ian Jackson [Wed, 2 Jun 2021 17:03:05 +0000 (18:03 +0100)]
sshkeys: Tests a restricted command, refactor

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys: Tests restricted command a bit more
Ian Jackson [Wed, 2 Jun 2021 17:01:13 +0000 (18:01 +0100)]
sshkeys: Tests restricted command a bit more

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys: Tests a restricted command, refactor
Ian Jackson [Wed, 2 Jun 2021 17:00:04 +0000 (18:00 +0100)]
sshkeys: Tests a restricted command, refactor

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys: Tests a restricted command
Ian Jackson [Wed, 2 Jun 2021 16:57:22 +0000 (17:57 +0100)]
sshkeys: Tests a restricted command

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys: Tests: Rework dummy key handling
Ian Jackson [Wed, 2 Jun 2021 16:56:58 +0000 (17:56 +0100)]
sshkeys: Tests: Rework dummy key handling

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys: Test that static data is included
Ian Jackson [Wed, 2 Jun 2021 16:45:50 +0000 (17:45 +0100)]
sshkeys: Test that static data is included

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys: Test banner and static handling
Ian Jackson [Wed, 2 Jun 2021 16:41:04 +0000 (17:41 +0100)]
sshkeys: Test banner and static handling

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys: Fix newline insertion
Ian Jackson [Wed, 2 Jun 2021 16:40:54 +0000 (17:40 +0100)]
sshkeys: Fix newline insertion

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys: Tests, wip
Ian Jackson [Tue, 1 Jun 2021 19:31:09 +0000 (20:31 +0100)]
sshkeys: Tests, wip

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys: Tests: Provide a dummy test key
Ian Jackson [Tue, 1 Jun 2021 19:42:50 +0000 (20:42 +0100)]
sshkeys: Tests: Provide a dummy test key

I threw the private half away.  Nevertheless, this should not be put
into any real file.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys: Fix auth key header newline
Ian Jackson [Wed, 2 Jun 2021 14:24:43 +0000 (15:24 +0100)]
sshkeys: Fix auth key header newline

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys: Fix magic banner handling
Ian Jackson [Wed, 2 Jun 2021 16:28:31 +0000 (17:28 +0100)]
sshkeys: Fix magic banner handling

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys: Improve ssh auth key banner and header
Ian Jackson [Wed, 2 Jun 2021 12:19:45 +0000 (13:19 +0100)]
sshkeys: Improve ssh auth key banner and header

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys: Some todos
Ian Jackson [Wed, 2 Jun 2021 17:10:01 +0000 (18:10 +0100)]
sshkeys: Some todos

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: sshkeys: Get line numbers right
Ian Jackson [Wed, 2 Jun 2021 16:40:43 +0000 (17:40 +0100)]
otter cli: sshkeys: Get line numbers right

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agocmdlistener: Tidy up connnection disconnect error
Ian Jackson [Wed, 2 Jun 2021 16:28:15 +0000 (17:28 +0100)]
cmdlistener: Tidy up connnection disconnect error

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: ssh keys: avoid creating account and then bailing
Ian Jackson [Wed, 2 Jun 2021 16:21:45 +0000 (17:21 +0100)]
otter cli: ssh keys: avoid creating account and then bailing

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: ssh keys: create accounts as necessary
Ian Jackson [Wed, 2 Jun 2021 16:15:42 +0000 (17:15 +0100)]
otter cli: ssh keys: create accounts as necessary

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoaccounts: Allow otter prep_access_account to never update it
Ian Jackson [Wed, 2 Jun 2021 16:13:42 +0000 (17:13 +0100)]
accounts: Allow otter prep_access_account to never update it

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoaccounts: Actually parse ssh: accounts
Ian Jackson [Wed, 2 Jun 2021 16:01:52 +0000 (17:01 +0100)]
accounts: Actually parse ssh: accounts

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: When rejecting removal of current key, print nicely
Ian Jackson [Wed, 2 Jun 2021 15:54:03 +0000 (16:54 +0100)]
otter cli: When rejecting removal of current key, print nicely

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: Rename inventory_subcmd
Ian Jackson [Wed, 2 Jun 2021 00:27:39 +0000 (01:27 +0100)]
otter cli: Rename inventory_subcmd

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: Suppress account selection for mgmtchannel-proxy
Ian Jackson [Wed, 2 Jun 2021 00:22:41 +0000 (01:22 +0100)]
otter cli: Suppress account selection for mgmtchannel-proxy

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: Make ordinary_subcommand handle SubcommandProperties
Ian Jackson [Wed, 2 Jun 2021 00:12:38 +0000 (01:12 +0100)]
otter cli: Make ordinary_subcommand handle SubcommandProperties

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: Move &Subcommand into MainOpts for convenience
Ian Jackson [Wed, 2 Jun 2021 00:18:10 +0000 (01:18 +0100)]
otter cli: Move &Subcommand into MainOpts for convenience

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: Make Subcommand Debug
Ian Jackson [Wed, 2 Jun 2021 00:17:58 +0000 (01:17 +0100)]
otter cli: Make Subcommand Debug

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: Make space for SubcommandProperties
Ian Jackson [Wed, 2 Jun 2021 00:10:15 +0000 (01:10 +0100)]
otter cli: Make space for SubcommandProperties

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: Make Subcommand a named field struct
Ian Jackson [Wed, 2 Jun 2021 00:09:12 +0000 (01:09 +0100)]
otter cli: Make Subcommand a named field struct

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: Introduce ordinary_subcmd macro
Ian Jackson [Wed, 2 Jun 2021 00:03:06 +0000 (01:03 +0100)]
otter cli: Introduce ordinary_subcmd macro

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys: Add paranoid whitespace check
Ian Jackson [Tue, 1 Jun 2021 20:51:26 +0000 (21:51 +0100)]
sshkeys: Add paranoid whitespace check

Newlines, in particular, would mess things up.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys: Do not include filename in context
Ian Jackson [Tue, 1 Jun 2021 20:50:47 +0000 (21:50 +0100)]
sshkeys: Do not include filename in context

This gets printed when we log the AuthKeysManipError.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys: Fix formatting of ssh authorized_keys files
Ian Jackson [Tue, 1 Jun 2021 20:48:45 +0000 (21:48 +0100)]
sshkeys: Fix formatting of ssh authorized_keys files

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys: Allow the creation of a fresh auth keys file
Ian Jackson [Tue, 1 Jun 2021 20:45:37 +0000 (21:45 +0100)]
sshkeys: Allow the creation of a fresh auth keys file

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoerrors: Rename AnyhowDisplay and provide .d() and use it
Ian Jackson [Tue, 1 Jun 2021 20:33:41 +0000 (21:33 +0100)]
errors: Rename AnyhowDisplay and provide .d() and use it

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoerrors: Provide AnyhowFormat and use it in two places
Ian Jackson [Tue, 1 Jun 2021 20:32:54 +0000 (21:32 +0100)]
errors: Provide AnyhowFormat and use it in two places

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoerrors: Drop some spurious uses of {:?} in messages
Ian Jackson [Tue, 1 Jun 2021 20:30:31 +0000 (21:30 +0100)]
errors: Drop some spurious uses of {:?} in messages

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agocommands: Drop a spurious \n in an error message
Ian Jackson [Tue, 1 Jun 2021 20:30:17 +0000 (21:30 +0100)]
commands: Drop a spurious \n in an error message

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoutils: Introduce anyhow::Error::for_each
Ian Jackson [Tue, 1 Jun 2021 19:57:49 +0000 (20:57 +0100)]
utils: Introduce anyhow::Error::for_each

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: mgmtchannel-proxy: Exit 0 on command EOF too
Ian Jackson [Tue, 1 Jun 2021 19:32:31 +0000 (20:32 +0100)]
otter cli: mgmtchannel-proxy: Exit 0 on command EOF too

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agosshkeys internal errors: Do not share with client
Ian Jackson [Tue, 1 Jun 2021 19:30:48 +0000 (20:30 +0100)]
sshkeys internal errors: Do not share with client

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoInternalError from anyhow: Add a missing colon to the messages
Ian Jackson [Tue, 1 Jun 2021 17:38:30 +0000 (18:38 +0100)]
InternalError from anyhow: Add a missing colon to the messages

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoapitest: Initial test of ssh
Ian Jackson [Tue, 1 Jun 2021 16:04:05 +0000 (17:04 +0100)]
apitest: Initial test of ssh

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoconfig: Observe that ssh_proxy_command will be split by ssh's shell
Ian Jackson [Tue, 1 Jun 2021 17:00:46 +0000 (18:00 +0100)]
config: Observe that ssh_proxy_command will be split by ssh's shell

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: Rename --ssh-proxy-command option
Ian Jackson [Tue, 1 Jun 2021 17:00:12 +0000 (18:00 +0100)]
otter cli: Rename --ssh-proxy-command option

This is shorter and more consistent.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoapitest: Provide OTTER_APITEST_START_DIR
Ian Jackson [Tue, 1 Jun 2021 16:59:32 +0000 (17:59 +0100)]
apitest: Provide OTTER_APITEST_START_DIR

Nothing uses this yet, nor, it appears, is going to, but it may come
in useful in the future, so let's keep it.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoMakefile, ssh proxy: Install a symlink
Ian Jackson [Tue, 1 Jun 2021 16:30:14 +0000 (17:30 +0100)]
Makefile, ssh proxy: Install a symlink

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: Shut down CookedStdout before bundle data
Ian Jackson [Tue, 1 Jun 2021 14:40:48 +0000 (15:40 +0100)]
otter cli: Shut down CookedStdout before bundle data

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: Shut down CookedStdout before proxying responses
Ian Jackson [Tue, 1 Jun 2021 14:39:36 +0000 (15:39 +0100)]
otter cli: Shut down CookedStdout before proxying responses

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter cli: Tiny fixes to stdout handling
Ian Jackson [Tue, 1 Jun 2021 14:37:23 +0000 (15:37 +0100)]
otter cli: Tiny fixes to stdout handling

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agootter: Introduce SubCommandSubArgs
Ian Jackson [Tue, 1 Jun 2021 14:35:05 +0000 (15:35 +0100)]
otter: Introduce SubCommandSubArgs

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>