chiark / gitweb /
logind: return -EINVAL when PID is wrong
[elogind.git] / src / login / logind-dbus.c
index 113a2b73b6289f0a068f0cb17d0a1fd1d8194ef7..e76381b32268a962d336ac5fd08d88647aeaa36e 100644 (file)
@@ -404,8 +404,8 @@ static int bus_manager_create_session(Manager *m, DBusMessage *message) {
                 int v;
 
                 if (!seat)
-                        seat = m->vtconsole;
-                else if (seat != m->vtconsole)
+                        seat = m->seat0;
+                else if (seat != m->seat0)
                         return -EINVAL;
 
                 v = vtnr_from_tty(tty);
@@ -420,8 +420,8 @@ static int bus_manager_create_session(Manager *m, DBusMessage *message) {
         } else if (tty_is_console(tty)) {
 
                 if (!seat)
-                        seat = m->vtconsole;
-                else if (seat != m->vtconsole)
+                        seat = m->seat0;
+                else if (seat != m->seat0)
                         return -EINVAL;
 
                 if (vtnr != 0)
@@ -429,7 +429,7 @@ static int bus_manager_create_session(Manager *m, DBusMessage *message) {
         }
 
         if (seat) {
-                if (seat_can_multi_session(seat)) {
+                if (seat_has_vts(seat)) {
                         if (vtnr > 63)
                                 return -EINVAL;
                 } else {
@@ -2256,7 +2256,7 @@ static DBusHandlerResult manager_message_handler(
                 }
 
                 HASHMAP_FOREACH(user, m->users, i)
-                        fprintf(f, "<node name=\"user/%llu\"/>", (unsigned long long) user->uid);
+                        fprintf(f, "<node name=\"user/_%llu\"/>", (unsigned long long) user->uid);
 
                 HASHMAP_FOREACH(session, m->sessions, i) {
                         p = bus_path_escape(session->id);
@@ -2395,7 +2395,6 @@ DBusHandlerResult bus_message_filter(
 
         } else if (dbus_message_is_signal(message, "org.freedesktop.DBus.Properties", "PropertiesChanged")) {
 
-                _cleanup_dbus_message_unref_ DBusMessage *reply = NULL;
                 _cleanup_free_ char *unit = NULL;
                 const char *path;