summaryrefslogtreecommitdiff
path: root/src/hostname
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-07 12:04:55 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-07 15:25:55 +0200
commit6294aa76d818e831de4592b41a37e225fd0871f9 (patch)
treeddf0aa3a760fbe4dc1126d4fd872e0d525203197 /src/hostname
parent7568345034f2890af745747783c5abfbf6eccf0f (diff)
util: don't consider tabs special in string_has_cc() anymore
Instead, take a list of exceptions to our usual CC check
Diffstat (limited to 'src/hostname')
-rw-r--r--src/hostname/hostnamed.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index 14629dd3a9..514554d575 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -550,8 +550,7 @@ static int set_machine_info(Context *c, sd_bus *bus, sd_bus_message *m, int prop
if (prop == PROP_ICON_NAME && !filename_is_safe(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) || chars_intersect(name, "\t")))
+ 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);
if (prop == PROP_CHASSIS && !valid_chassis(name))
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid chassis '%s'", name);