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 #10264 
Closes #10265
  • Loading branch information
adamdmoss authored Apr 30, 2020
1 parent ab16c87 commit d7d4678
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 d7d4678

Please sign in to comment.