sd-login: use the same code for verfiying machine names everywhere
authorLennart Poettering <lennart@poettering.net>
Wed, 2 Jul 2014 23:19:26 +0000 (01:19 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 2 Jul 2014 23:19:26 +0000 (01:19 +0200)
src/libsystemd/sd-login/sd-login.c

index 375a538..d1478dd 100644 (file)
@@ -770,7 +770,7 @@ _public_ int sd_machine_get_class(const char *machine, char **class) {
         const char *p;
         int r;
 
-        assert_return(filename_is_safe(machine), -EINVAL);
+        assert_return(machine_name_is_valid(machine), -EINVAL);
         assert_return(class, -EINVAL);
 
         p = strappenda("/run/systemd/machines/", machine);