Commit Graph

7 Commits

Author SHA1 Message Date
Finn Behrens
a613340b26 rust keylocation add none variant and implement ValueEnum
This enables a possible values help in the clap help text.

Signed-Off-By: Finn Behrens <me@kloenk.de>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-12 11:14:16 -05:00
Colin Gillespie
9fe08ba354 cmd_mount: request passphrase if the existing key is revoked
Signed-off-by: Colin Gillespie <colin@cgillespie.xyz>
2023-09-08 04:05:39 -04:00
Colin Gillespie
4d04fe4262 cmd_mount: use the correct keyring key type
Mount is checking for and adding encryption keys using the logon key
type instead of the user key type. This was causing it to not be able to
unlock volumes on its own, and ask for a passphrase on already unlocked
volumes.

Signed-off-by: Colin Gillespie <colin@cgillespie.xyz>
2023-08-12 12:06:24 -04:00
Jörg Thalheim
9090bf3c36 fix reading keys from non-tty inputs
read_password_from_tty doesn't have a fallback if input is a pipe.
This makes scripting and integration testing harder.

Noticed while updating our nixos integration test.

Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
2023-06-15 19:11:54 +02:00
TruongSinh Tran-Nguyen
47ec3ed6ed chore: logger for idiomatic style and expanded logging levels
Improve the Rust logger by adhering to idiomatic Rust conventions and
incorporating additional logging levels: warn, debug, and trace.

Signed-off-by: TruongSinh Tran-Nguyen <i@truongsinh.pro>
2023-04-26 17:46:23 -04:00
Kent Overstreet
f2ab6e552d More rust improvements
- passing of arguments from c -> rust code now works correctly
 - 'bcachefs mount' now handles being passed a device or devices

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-21 14:39:43 -05:00
Kent Overstreet
28f703cc25 Rust now integrated into bcachefs binary
Rust is now required for building the bcachefs tool, and rust code is
now fully integrated with the C codebase - meaning it is possible to
call back and forth.

The mount helper is now a subcommand, 'mount.bcachefs' is now a small
shell wrapper that invokes 'bcachefs mount'.

This will make it easier to start rewriting other subcommands in rust,
and eventually the whole command line interface.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-02-21 01:03:08 -05:00