Fix regression caused by c14ca14

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
This commit is contained in:
Adam D. Moss 2020-04-29 17:33:33 -07:00 committed by GitHub
parent ab16c87e55
commit d7d4678fe6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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,