chiark / gitweb /
logind: implement D-Bus properties
[elogind.git] / src / logind-session.c
index 8f1280d..6b3b277 100644 (file)
@@ -83,6 +83,7 @@ void session_free(Session *s) {
         free(s->tty);
         free(s->display);
         free(s->remote_host);
+        free(s->remote_user);
 
         hashmap_remove(s->manager->sessions, s->id);
 
@@ -147,6 +148,11 @@ int session_save(Session *s) {
                         "REMOTE_HOST=%s\n",
                         s->remote_host);
 
+        if (s->remote_user)
+                fprintf(f,
+                        "REMOTE_USER=%s\n",
+                        s->remote_user);
+
         if (s->seat && s->seat->manager->vtconsole == s->seat)
                 fprintf(f,
                         "VTNR=%i\n",
@@ -495,7 +501,7 @@ void session_add_to_gc_queue(Session *s) {
 }
 
 static const char* const session_type_table[_SESSION_TYPE_MAX] = {
-        [SESSION_TERMINAL] = "terminal",
+        [SESSION_TTY] = "tty",
         [SESSION_X11] = "x11"
 };