msgstr ""
"Project-Id-Version: systemd\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2026-05-30 00:13+0200\n"
+"POT-Creation-Date: 2026-06-01 11:49+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Authentication is required to freeze or thaw the processes of '$(unit)' unit."
msgstr ""
-#: src/shared/libfido2-util.c:497 src/shared/libfido2-util.c:554
+#: src/shared/libfido2-util.c:500 src/shared/libfido2-util.c:557
msgid "Please confirm presence on security token to unlock."
msgstr ""
-#: src/shared/libfido2-util.c:513
+#: src/shared/libfido2-util.c:516
msgid "Please verify user on security token to unlock."
msgstr ""
-#: src/shared/libfido2-util.c:926
+#: src/shared/libfido2-util.c:936
+#, c-format
+msgid ""
+"Please enter security token PIN (remaining attempts before lock-out: %d):"
+msgstr ""
+
+#: src/shared/libfido2-util.c:948
msgid "Please enter security token PIN:"
msgstr ""
#include "iovec-util.h"
#include "locale-util.h"
#include "plymouth-util.h"
+#include "stdio-util.h"
#include "string-util.h"
#include "strv.h"
#include "unistd.h"
DLSYM_PROTOTYPE(fido_dev_free) = NULL;
DLSYM_PROTOTYPE(fido_dev_get_assert) = NULL;
DLSYM_PROTOTYPE(fido_dev_get_cbor_info) = NULL;
+DLSYM_PROTOTYPE(fido_dev_get_retry_count) = NULL;
DLSYM_PROTOTYPE(fido_dev_info_free) = NULL;
DLSYM_PROTOTYPE(fido_dev_info_manifest) = NULL;
DLSYM_PROTOTYPE(fido_dev_info_manufacturer_string) = NULL;
DLSYM_ARG(fido_dev_free),
DLSYM_ARG(fido_dev_get_assert),
DLSYM_ARG(fido_dev_get_cbor_info),
+ DLSYM_ARG(fido_dev_get_retry_count),
DLSYM_ARG(fido_dev_info_free),
DLSYM_ARG(fido_dev_info_manifest),
DLSYM_ARG(fido_dev_info_manufacturer_string),
for (;;) {
_cleanup_strv_free_erase_ char **pin = NULL;
+ _cleanup_free_ char *ask_pin_msg = NULL;
+ int pin_retries = -1;
+
+ r = sym_fido_dev_get_retry_count(d, &pin_retries);
+ if (r != FIDO_OK) {
+ log_warning("Failed to obtain number of retries before lock-out for PIN "
+ "authentication, ignoring: %s", sym_fido_strerr(r));
+ pin_retries = -1;
+ }
+
+ if (pin_retries >= 0) {
+ ask_pin_msg = asprintf_safe(_("Please enter security token PIN "
+ "(remaining attempts before lock-out: %d):"),
+ pin_retries);
+ if (!ask_pin_msg)
+ return log_oom();
+ }
+
AskPasswordRequest req = {
.tty_fd = -EBADF,
- .message = _("Please enter security token PIN:"),
+ .message = pin_retries >= 0
+ ? ask_pin_msg
+ : _("Please enter security token PIN:"),
.icon = askpw_icon,
.keyring = "fido2-pin",
.credential = askpw_credential,
extern DLSYM_PROTOTYPE(fido_dev_free);
extern DLSYM_PROTOTYPE(fido_dev_get_assert);
extern DLSYM_PROTOTYPE(fido_dev_get_cbor_info);
+extern DLSYM_PROTOTYPE(fido_dev_get_retry_count);
extern DLSYM_PROTOTYPE(fido_dev_info_free);
extern DLSYM_PROTOTYPE(fido_dev_info_manifest);
extern DLSYM_PROTOTYPE(fido_dev_info_manufacturer_string);