From: Lennart Poettering Date: Mon, 31 May 2021 20:15:48 +0000 (+0200) Subject: homework: fix return codes when using fido2/pkcs11 cached passwords X-Git-Tag: v249-rc1~121^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e49614278dcf4d3d2e571e9ac67444e04de6381e;p=thirdparty%2Fsystemd.git homework: fix return codes when using fido2/pkcs11 cached passwords Otherwise we'll accidently report a record we can safely decrypt as not decrypted. --- diff --git a/src/home/homework.c b/src/home/homework.c index a6e663503bd..ed6fc2c3449 100644 --- a/src/home/homework.c +++ b/src/home/homework.c @@ -127,7 +127,7 @@ int user_record_authenticate( return log_error_errno(r, "Failed to check supplied FIDO2 password: %m"); if (r > 0) { log_info("Previously acquired FIDO2 password unlocks user record."); - return 0; + return 1; } } } @@ -180,7 +180,7 @@ int user_record_authenticate( if (r < 0) return log_oom(); - return 0; + return 1; } #else need_token = true;