summaryrefslogtreecommitdiffstats
path: root/src/home/homectl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-04-14 19:18:09 +0200
committerLennart Poettering <lennart@poettering.net>2020-07-01 11:17:28 +0200
commit7b78db28e544f3007b22b612da229773987fdf74 (patch)
tree971df7fafb14062e2f9daf853bd432fdf7dd8a75 /src/home/homectl.c
parenthomectl: add support for enrolling FIDO2 HMAC-SECRET tokens (diff)
downloadsystemd-7b78db28e544f3007b22b612da229773987fdf74.tar.xz
systemd-7b78db28e544f3007b22b612da229773987fdf74.zip
homed: add support for authenticating with fido2 hmac-secret tokens
Diffstat (limited to 'src/home/homectl.c')
-rw-r--r--src/home/homectl.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/home/homectl.c b/src/home/homectl.c
index a7b548aa61..886069fb49 100644
--- a/src/home/homectl.c
+++ b/src/home/homectl.c
@@ -331,8 +331,18 @@ static int handle_generic_user_record_error(
if (r < 0)
return log_error_errno(r, "Failed to set PKCS#11 protected authentication path permitted flag: %m");
+ } else if (sd_bus_error_has_name(error, BUS_ERROR_TOKEN_USER_PRESENCE_NEEDED)) {
+
+ log_notice("%s%sAuthentication requires presence verification on security token.",
+ emoji_enabled() ? special_glyph(SPECIAL_GLYPH_TOUCH) : "",
+ emoji_enabled() ? " " : "");
+
+ r = user_record_set_fido2_user_presence_permitted(hr, true);
+ if (r < 0)
+ return log_error_errno(r, "Failed to set FIDO2 user presence permitted flag: %m");
+
} else if (sd_bus_error_has_name(error, BUS_ERROR_TOKEN_PIN_LOCKED))
- return log_error_errno(SYNTHETIC_ERRNO(EPERM), "Security token PIN is locked, please unlock security token PIN first.");
+ return log_error_errno(SYNTHETIC_ERRNO(EPERM), "Security token PIN is locked, please unlock it first. (Hint: Removal and re-insertion might suffice.)");
else if (sd_bus_error_has_name(error, BUS_ERROR_TOKEN_BAD_PIN)) {