summaryrefslogtreecommitdiff
path: root/src/locale/localed.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/locale/localed.c')
-rw-r--r--src/locale/localed.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/locale/localed.c b/src/locale/localed.c
index fedcdfb37..4f85b8b58 100644
--- a/src/locale/localed.c
+++ b/src/locale/localed.c
@@ -29,12 +29,15 @@
#include "mkdir.h"
#include "strv.h"
#include "dbus-common.h"
#include "polkit.h"
#include "def.h"
#include "env-util.h"
+#include "fileio.h"
+#include "fileio-label.h"
+#include "label.h"
#define INTERFACE \
" <interface name=\"org.freedesktop.locale1\">\n" \
" <property name=\"Locale\" type=\"as\" access=\"read\"/>\n" \
" <property name=\"VConsoleKeymap\" type=\"s\" access=\"read\"/>\n" \
" <property name=\"VConsoleKeymapToggle\" type=\"s\" access=\"read\"/>\n" \
@@ -387,13 +390,13 @@ static int write_data_locale(void) {
if (unlink("/etc/locale.conf") < 0)
return errno == ENOENT ? 0 : -errno;
return 0;
}
- r = write_env_file("/etc/locale.conf", l);
+ r = write_env_file_label("/etc/locale.conf", l);
strv_free(l);
return r;
}
static void push_data(DBusConnection *bus) {
@@ -543,13 +546,13 @@ static int write_data_vconsole(void) {
if (unlink("/etc/vconsole.conf") < 0)
return errno == ENOENT ? 0 : -errno;
return 0;
}
- r = write_env_file("/etc/vconsole.conf", l);
+ r = write_env_file_label("/etc/vconsole.conf", l);
strv_free(l);
return r;
}
static int write_data_x11(void) {
@@ -1361,13 +1364,13 @@ int main(int argc, char *argv[]) {
DBusConnection *bus = NULL;
bool exiting = false;
log_set_target(LOG_TARGET_AUTO);
log_parse_environment();
log_open();
-
+ label_init("/etc");
umask(0022);
if (argc == 2 && streq(argv[1], "--introspect")) {
fputs(DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE
"<node>\n", stdout);
fputs(locale_interface, stdout);