X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flocale%2Flocaled.c;h=4f85b8b583ddab7fb2e5bfaad5441cf4aa6a715e;hb=6210afbcff435c857458a908d730db176797a0f7;hp=bb2a3a2e5422cea56ac865052f836c80b1de11c4;hpb=9a9bb3ca1eddc8caa2d7aa3e6e27d270e296923f;p=elogind.git diff --git a/src/locale/localed.c b/src/locale/localed.c index bb2a3a2e5..4f85b8b58 100644 --- a/src/locale/localed.c +++ b/src/locale/localed.c @@ -31,6 +31,10 @@ #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 \ " \n" \ @@ -389,7 +393,7 @@ static int write_data_locale(void) { return 0; } - r = write_env_file("/etc/locale.conf", l); + r = write_env_file_label("/etc/locale.conf", l); strv_free(l); return r; @@ -545,7 +549,7 @@ static int write_data_vconsole(void) { return 0; } - r = write_env_file("/etc/vconsole.conf", l); + r = write_env_file_label("/etc/vconsole.conf", l); strv_free(l); return r; @@ -853,7 +857,7 @@ static int convert_x11_to_vconsole(DBusConnection *connection) { * layout stripped off. */ if (x > 0 && strlen(a[1]) == x && - strncmp(state.x11_layout, a[1], x) == 0) + strneq(state.x11_layout, a[1], x)) matching = 5; else { size_t w; @@ -1363,7 +1367,7 @@ int main(int argc, char *argv[]) { log_set_target(LOG_TARGET_AUTO); log_parse_environment(); log_open(); - + label_init("/etc"); umask(0022); if (argc == 2 && streq(argv[1], "--introspect")) {