summaryrefslogtreecommitdiffstats
path: root/src/shared/locale-setup.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-12-13 10:04:48 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-12-14 12:18:58 +0100
commit56b7f112ed7e3e5e6f495e8d01a89c292c9f8847 (patch)
tree39169f19e32af849efbf58e269fc4ff401bfdb7e /src/shared/locale-setup.h
parentlocale-setup: make failure in stat() critical (diff)
downloadsystemd-56b7f112ed7e3e5e6f495e8d01a89c292c9f8847.tar.xz
systemd-56b7f112ed7e3e5e6f495e8d01a89c292c9f8847.zip
locale-setup: avoid TOCTOU in reading locale.conf
Diffstat (limited to 'src/shared/locale-setup.h')
-rw-r--r--src/shared/locale-setup.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/shared/locale-setup.h b/src/shared/locale-setup.h
index ec3fc8c364..537acc72df 100644
--- a/src/shared/locale-setup.h
+++ b/src/shared/locale-setup.h
@@ -1,11 +1,12 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
+#include <sys/stat.h>
+
#include "locale-util.h"
-#include "time-util.h"
typedef struct LocaleContext {
- usec_t mtime;
+ struct stat st;
char *locale[_VARIABLE_LC_MAX];
} LocaleContext;