chiark / gitweb /
hostnamed: make use of in_charset() to verify charset
authorLennart Poettering <lennart@poettering.net>
Fri, 11 Jul 2014 13:37:11 +0000 (15:37 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 11 Jul 2014 13:37:11 +0000 (15:37 +0200)
src/hostname/hostnamed.c

index 19ab500..d826a31 100644 (file)
@@ -155,7 +155,7 @@ static bool valid_chassis(const char *chassis) {
 static bool valid_deployment(const char *deployment) {
         assert(deployment);
 
-        return strspn(deployment, VALID_DEPLOYMENT_CHARS) == strlen(deployment);
+        return in_charset(deployment, VALID_DEPLOYMENT_CHARS);
 }
 
 static const char* fallback_chassis(void) {