On Thu, Mar 28, 2019 at 12:07 PM Dave Jiang <[email protected]> wrote:
>
> load-keys incorrectly assumes that all keys have TPM handles. TPM handle is
> only for trusted-keys. Fix in order to allow user master-key work.

s/work/to operate/ ?

>
> Signed-off-by: Dave Jiang <[email protected]>
> ---
>  ndctl/load-keys.c |    6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/ndctl/load-keys.c b/ndctl/load-keys.c
> index 8e4998f2..19380152 100644
> --- a/ndctl/load-keys.c
> +++ b/ndctl/load-keys.c
> @@ -213,10 +213,8 @@ static int load_keys(struct loadkeys *lk_ctx, const char 
> *keypath,
>
>         if (!tpmhandle) {
>                 rc = check_tpm_handle(lk_ctx);
> -               if (rc < 0) {
> -                       rc = -errno;
> -                       goto erropen;
> -               }
> +               if (rc < 0)
> +                       printf("No TPM handle discovered.\n");

Please keep error messages on stderr.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

Reply via email to