From dbe253aa9dcb26163a9d483e5b6fe2e759d42d5b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 28 Feb 2024 14:59:31 +0100 Subject: [PATCH] =?utf8?q?env-util:=20also=20rename=20getenv=5Fuint64=5Fse?= =?utf8?q?cure()=20=E2=86=92=20secure=5Fgetenv=5Fuint64()?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit As in the previous commit, let's not change the order of the words compared to the underlying glibc API. --- src/basic/env-util.c | 2 +- src/basic/env-util.h | 2 +- src/sysusers/sysusers.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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; -- 2.47.3