chiark / gitweb /
Do no isolate in case of emergency or severe problems
[elogind.git] / src / hostname / hostnamed.c
index 7ea891c68101e96132445719d0bd0adf4e77c383..859b5a07845400ce1bd86523f642422415802d53 100644 (file)
@@ -553,7 +553,7 @@ static DBusHandlerResult hostname_message_handler(
                                  * safe than sorry */
                                 if (k == PROP_ICON_NAME && !filename_is_safe(name))
                                         return bus_send_error_reply(connection, message, NULL, -EINVAL);
-                                if (k == PROP_PRETTY_HOSTNAME && !string_is_safe(name))
+                                if (k == PROP_PRETTY_HOSTNAME && string_has_cc(name))
                                         return bus_send_error_reply(connection, message, NULL, -EINVAL);
                                 if (k == PROP_CHASSIS && !valid_chassis(name))
                                         return bus_send_error_reply(connection, message, NULL, -EINVAL);
@@ -592,7 +592,7 @@ static DBusHandlerResult hostname_message_handler(
         if (!reply)
                 goto oom;
 
-        if (!dbus_connection_send(connection, reply, NULL))
+        if (!bus_maybe_send_reply(connection, message, reply))
                 goto oom;
 
         dbus_message_unref(reply);