`systemd-ask-password`:
-* `$SYSTEMD_ASK_PASSWORD_KEYRING_TIMEOUT_SEC` - takes a timespan or `default`,
- which controls the expiration time of keys stored in the kernel keyring by
- `systemd-ask-password`. If unset or set to `default`, the default expiration
- of 150 seconds is used. If set to `0`, keys are not cached in the kernel
- keyring. If set to `infinity`, keys are cached without an expiration time in
- the kernel keyring.
+* `$SYSTEMD_ASK_PASSWORD_KEYRING_TIMEOUT_SEC` - takes a timespan, which controls
+ the expiration time of keys stored in the kernel keyring by `systemd-ask-password`.
+ If unset, the default expiration of 150 seconds is used. If set to `0`, keys are
+ not cached in the kernel keyring. If set to `infinity`, keys are cached without an
+ expiration time in the kernel keyring.
return saved_timeout;
const char *e = secure_getenv("SYSTEMD_ASK_PASSWORD_KEYRING_TIMEOUT_SEC");
- if (e && !streq(e, "default")) {
+ if (e) {
r = parse_sec(e, &saved_timeout);
if (r < 0)
log_debug_errno(r, "Invalid value in $SYSTEMD_ASK_PASSWORD_KEYRING_TIMEOUT_SEC, ignoring: %s", e);