X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fhostname%2Fhostnamed.c;h=7cd4a1d001d35d285c3e26cd6a0412efa03599f3;hb=a3bd89ea99214db7ca2ad6ae59181d5119a54f09;hp=970e8007690982abc503edbfc984c8300595c271;hpb=f7340ab269828d917cd1281e33e6dd4fdfee67b3;p=elogind.git diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index 970e80076..7cd4a1d00 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -23,7 +23,6 @@ #include #include #include -#include #include "util.h" #include "strv.h" @@ -34,6 +33,7 @@ #include "label.h" #include "bus-util.h" #include "event-util.h" +#include "selinux-util.h" #define VALID_DEPLOYMENT_CHARS (DIGITS LETTERS "-.:") @@ -552,7 +552,7 @@ static int set_machine_info(Context *c, sd_bus *bus, sd_bus_message *m, int prop /* The icon name might ultimately be used as file * name, so better be safe than sorry */ - if (prop == PROP_ICON_NAME && !filename_is_safe(name)) + if (prop == PROP_ICON_NAME && !filename_is_valid(name)) return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid icon name '%s'", name); if (prop == PROP_PRETTY_HOSTNAME && string_has_cc(name, NULL)) return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid pretty host name '%s'", name);