From: Lennart Poettering Date: Wed, 28 Feb 2024 13:59:31 +0000 (+0100) Subject: env-util: also rename getenv_uint64_secure() → secure_getenv_uint64() X-Git-Tag: v256-rc1~706^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dbe253aa9dcb26163a9d483e5b6fe2e759d42d5b;p=thirdparty%2Fsystemd.git env-util: also rename getenv_uint64_secure() → secure_getenv_uint64() As in the previous commit, let's not change the order of the words compared to the underlying glibc API. --- diff --git a/src/basic/env-util.c b/src/basic/env-util.c index bc121228d5b..7608f90a4a6 100644 --- a/src/basic/env-util.c +++ b/src/basic/env-util.c @@ -973,7 +973,7 @@ int secure_getenv_bool(const char *p) { return parse_boolean(e); } -int getenv_uint64_secure(const char *p, uint64_t *ret) { +int secure_getenv_uint64(const char *p, uint64_t *ret) { const char *e; assert(p); diff --git a/src/basic/env-util.h b/src/basic/env-util.h index 3ac1dfb3799..6610ca8ca16 100644 --- a/src/basic/env-util.h +++ b/src/basic/env-util.h @@ -64,7 +64,7 @@ char *strv_env_pairs_get(char **l, const char *name) _pure_; int getenv_bool(const char *p); int secure_getenv_bool(const char *p); -int getenv_uint64_secure(const char *p, uint64_t *ret); +int secure_getenv_uint64(const char *p, uint64_t *ret); /* Like setenv, but calls unsetenv if value == NULL. */ int set_unset_env(const char *name, const char *value, bool overwrite); diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c index 6e28b1cf8ff..e443b102116 100644 --- a/src/sysusers/sysusers.c +++ b/src/sysusers/sysusers.c @@ -569,7 +569,7 @@ static int write_temporary_passwd( static usec_t epoch_or_now(void) { uint64_t epoch; - if (getenv_uint64_secure("SOURCE_DATE_EPOCH", &epoch) >= 0) { + if (secure_getenv_uint64("SOURCE_DATE_EPOCH", &epoch) >= 0) { if (epoch > UINT64_MAX/USEC_PER_SEC) /* Overflow check */ return USEC_INFINITY; return (usec_t) epoch * USEC_PER_SEC;