diff options
author | William Jon McCann <jmccann@redhat.com> | 2008-05-05 14:20:25 -0400 |
---|---|---|
committer | William Jon McCann <jmccann@redhat.com> | 2008-05-05 14:20:25 -0400 |
commit | 844de7d4b6d29d57a5425dcc7d0d3f6d4b005311 (patch) | |
tree | d59bf3cacfaac9630ec534c64a94cd8bef31f9f4 /tools/list-sessions.c | |
parent | 8ec523138671a8fe93748a0b75adaaca96e2392e (diff) |
export login session id to the bus
Diffstat (limited to 'tools/list-sessions.c')
-rw-r--r-- | tools/list-sessions.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/list-sessions.c b/tools/list-sessions.c index b883642..c320845 100644 --- a/tools/list-sessions.c +++ b/tools/list-sessions.c @@ -163,6 +163,7 @@ list_session (DBusGConnection *connection, int uid; char *realname; char *sid; + char *lsid; char *session_type; char *x11_display; char *x11_display_device; @@ -184,6 +185,7 @@ list_session (DBusGConnection *connection, } sid = NULL; + lsid = NULL; session_type = NULL; x11_display = NULL; x11_display_device = NULL; @@ -194,6 +196,7 @@ list_session (DBusGConnection *connection, get_int (proxy, "GetUnixUser", &uid); get_path (proxy, "GetSeatId", &sid); + get_string (proxy, "GetLoginSessionId", &lsid); get_string (proxy, "GetSessionType", &session_type); get_string (proxy, "GetX11Display", &x11_display); get_string (proxy, "GetX11DisplayDevice", &x11_display_device); @@ -216,7 +219,7 @@ list_session (DBusGConnection *connection, short_ssid = ssid + strlen (CK_PATH) + 1; } - printf ("%s:\n\tunix-user = '%d'\n\trealname = '%s'\n\tseat = '%s'\n\tsession-type = '%s'\n\tactive = %s\n\tx11-display = '%s'\n\tx11-display-device = '%s'\n\tdisplay-device = '%s'\n\tremote-host-name = '%s'\n\tis-local = %s\n\ton-since = '%s'", + printf ("%s:\n\tunix-user = '%d'\n\trealname = '%s'\n\tseat = '%s'\n\tsession-type = '%s'\n\tactive = %s\n\tx11-display = '%s'\n\tx11-display-device = '%s'\n\tdisplay-device = '%s'\n\tremote-host-name = '%s'\n\tis-local = %s\n\ton-since = '%s'\n\tlogin-session-id = '%s'", short_ssid, uid, realname, @@ -228,7 +231,8 @@ list_session (DBusGConnection *connection, display_device, remote_host_name, is_local ? "TRUE" : "FALSE", - creation_time); + creation_time, + lsid); if (idle_since_hint != NULL && idle_since_hint[0] != '\0') { printf ("\n\tidle-since-hint = '%s'", idle_since_hint); } @@ -239,6 +243,7 @@ list_session (DBusGConnection *connection, g_free (remote_host_name); g_free (realname); g_free (sid); + g_free (lsid); g_free (session_type); g_free (x11_display); g_free (x11_display_device); |