Skip to content

Commit

Permalink
Fix regression caused by c14ca14
Browse files Browse the repository at this point in the history
The 'zfs load-key' command was broken for 'keyformat=passphrase'.
Use the correct output vars when stdin is an interactive terminal.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: adam moss <c@yotes.com>
Closes openzfs#10264 
Closes openzfs#10265
  • Loading branch information
adamdmoss authored and jsai20 committed Mar 30, 2021
1 parent 8b9b2cb commit 6aff7b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/libzfs/libzfs_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ get_key_material(libzfs_handle_t *hdl, boolean_t do_verify, boolean_t newkey,
if (isatty(fileno(stdin))) {
can_retry = B_TRUE;
ret = get_key_interactive(hdl, fsname, keyformat,
do_verify, newkey, km_out, kmlen_out);
do_verify, newkey, &km, &kmlen);
} else {
/* fetch the key material into the buffer */
ret = get_key_material_raw(stdin, keyformat, &km,
Expand Down

0 comments on commit 6aff7b9

Please sign in to comment.