sysusers: make sp_lstchg shadow field reproducible
If the environment variable SOURCE_DATE_EPOCH is set, use its value instead of the current time.
This commit is contained in:
committed by
Lennart Poettering
parent
dddec402de
commit
3fa8a1148a
@@ -776,6 +776,18 @@ int getenv_bool_secure(const char *p) {
|
||||
return parse_boolean(e);
|
||||
}
|
||||
|
||||
int getenv_uint64_secure(const char *p, uint64_t *ret) {
|
||||
const char *e;
|
||||
|
||||
assert(p);
|
||||
|
||||
e = secure_getenv(p);
|
||||
if (!e)
|
||||
return -ENXIO;
|
||||
|
||||
return safe_atou64(e, ret);
|
||||
}
|
||||
|
||||
int set_unset_env(const char *name, const char *value, bool overwrite) {
|
||||
assert(name);
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@ char *strv_env_pairs_get(char **l, const char *name) _pure_;
|
||||
int getenv_bool(const char *p);
|
||||
int getenv_bool_secure(const char *p);
|
||||
|
||||
int getenv_uint64_secure(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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user