diff options
author | William Jon McCann <jmccann@redhat.com> | 2008-04-03 22:09:26 -0400 |
---|---|---|
committer | William Jon McCann <jmccann@redhat.com> | 2008-04-03 22:09:26 -0400 |
commit | e633be1b9a81cfb7993e469066e50af47f563575 (patch) | |
tree | 1449c68f2caab4c717ca2514ee547716fc2916d3 /tools | |
parent | 4740245c6f6137175ef51be2207c35185f4d98f1 (diff) | |
download | ConsoleKit2-e633be1b9a81cfb7993e469066e50af47f563575.tar.gz |
initial login session id support
Linux audit session id support. Still TODO:
* determine if session id should be hidden
* export to bus
* add to event log
* figure out how to add it to non-generated sessions
Diffstat (limited to 'tools')
-rw-r--r-- | tools/ck-collect-session-info.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/ck-collect-session-info.c b/tools/ck-collect-session-info.c index 334c088..75d8d45 100644 --- a/tools/ck-collect-session-info.c +++ b/tools/ck-collect-session-info.c @@ -37,6 +37,7 @@ typedef struct { uid_t uid; pid_t pid; + char *login_session_id; char *display_device; char *x11_display_device; char *x11_display; @@ -49,6 +50,7 @@ typedef struct { static void session_info_free (SessionInfo *si) { + g_free (si->login_session_id); g_free (si->display_device); g_free (si->x11_display_device); g_free (si->x11_display); @@ -309,6 +311,11 @@ fill_session_info (SessionInfo *si) si->is_local_is_set = TRUE; } + res = ck_unix_pid_get_login_session_id (si->pid, &si->login_session_id); + if (! res) { + si->login_session_id = NULL; + } + return TRUE; } @@ -331,6 +338,9 @@ print_session_info (SessionInfo *si) if (si->is_local_is_set == TRUE) { printf ("is-local = %s\n", si->is_local ? "true" : "false"); } + if (si->login_session_id != NULL) { + printf ("login-session-id = %s\n", si->login_session_id); + } } static gboolean |