diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c index 9d9ac7d430..307137b431 100644 --- a/src/libsystemd/sd-device/sd-device.c +++ b/src/libsystemd/sd-device/sd-device.c @@ -31,7 +31,6 @@ #include "string-util.h" #include "strv.h" #include "time-util.h" -#include "utf8.h" int device_new_aux(sd_device **ret) { sd_device *device; @@ -97,10 +96,10 @@ static bool property_is_valid(const char *key, const char *value) { return true; /* refuse invalid UTF8 and control characters */ - if (!utf8_is_valid(value) || string_has_cc(value, /* ok= */ NULL)) - return false; - - return true; + return string_is_safe(value, + STRING_ALLOW_BACKSLASHES | + STRING_ALLOW_QUOTES | + STRING_ALLOW_GLOBS); } int device_add_property_aux(sd_device *device, const char *key, const char *value, bool db) {