openbsd-ports/sysutils/consolekit/patches/patch-tools_ck-collect-session-info_c
ajacoutot 03b8f5bd01 Update to consolekit-0.4.4.
Make sure we don't try and use /proc.
s/KERN_PROC2/KERN_PROC

ok jasper@
2011-04-28 13:08:33 +00:00

33 lines
1.2 KiB
Plaintext

$OpenBSD: patch-tools_ck-collect-session-info_c,v 1.1 2011/04/28 13:08:33 ajacoutot Exp $
XXX revert 4f88228f31a63c026c424a92827f26ad7535275c
The Kit people assume the world runs Linux and PAM, see
https://bugs.freedesktop.org/show_bug.cgi?id=28377
--- tools/ck-collect-session-info.c.orig Fri Sep 3 15:54:31 2010
+++ tools/ck-collect-session-info.c Sat Dec 4 12:18:34 2010
@@ -274,7 +274,8 @@ fill_x11_info (SessionInfo *si)
si->x11_display_device = ck_process_stat_get_tty (xorg_stat);
ck_process_stat_free (xorg_stat);
- /* don't set is-local here - let the daemon do that */
+ si->is_local = TRUE;
+ si->is_local_is_set = TRUE;
g_free (si->remote_host_name);
si->remote_host_name = NULL;
@@ -302,6 +303,13 @@ fill_session_info (SessionInfo *si)
ck_process_stat_free (stat);
fill_x11_info (si);
+
+ if (! si->is_local_is_set) {
+ /* FIXME: how should we set this? */
+ /* non x11 sessions must be local I guess */
+ si->is_local = TRUE;
+ si->is_local_is_set = TRUE;
+ }
res = ck_unix_pid_get_login_session_id (si->pid, &si->login_session_id);
if (! res) {