]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ask-password: Drop "default" for SYSTEMD_ASK_PASSWORD_KEYRING_TIMEOUT_SEC
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 1 Nov 2024 11:45:29 +0000 (12:45 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 2 Nov 2024 22:20:57 +0000 (23:20 +0100)
Users can simply unset the environment variable to achieve the same effect.

docs/ENVIRONMENT.md
src/shared/ask-password-api.c

index 48eeaa508c8f7cd9e22ab633c71d719c6fc6c922..b0b30949fbbc8becf663102c8d302df45253016e 100644 (file)
@@ -738,9 +738,8 @@ Tools using the Varlink protocol (such as `varlinkctl`) or sd-bus (such as
 
 `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.
index aa45468402b7a1ec8ae017aed008c8a6dcf2bee8..eba647aaef83a6b24619b1c81bcc65018081cf49 100644 (file)
@@ -123,7 +123,7 @@ static usec_t keyring_cache_timeout(void) {
                 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);