summaryrefslogtreecommitdiff
path: root/src/logind-session.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/logind-session.c')
-rw-r--r--src/logind-session.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/logind-session.c b/src/logind-session.c
index 8f1280dbdc..6b3b277897 100644
--- a/src/logind-session.c
+++ b/src/logind-session.c
@@ -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"
};