From d7d4678fe65689af7f6335c7f84a190139bcbcdf Mon Sep 17 00:00:00 2001 From: "Adam D. Moss" Date: Wed, 29 Apr 2020 17:33:33 -0700 Subject: [PATCH] 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 Signed-off-by: adam moss Closes #10264 Closes #10265 --- lib/libzfs/libzfs_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libzfs/libzfs_crypto.c b/lib/libzfs/libzfs_crypto.c index 8e7005f5aa..c83c213e3f 100644 --- a/lib/libzfs/libzfs_crypto.c +++ b/lib/libzfs/libzfs_crypto.c @@ -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,