When assigning session to active VT prefer graphical sessions (upstream).

Fix undefined behavior (upstream).
This commit is contained in:
ajacoutot 2016-01-21 06:43:37 +00:00
parent b0549489d8
commit 5ca33fd3e8
4 changed files with 60 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.55 2016/01/15 14:20:02 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.56 2016/01/21 06:43:37 ajacoutot Exp $
COMMENT= framework for defining and tracking users, sessions & seats
@ -7,6 +7,7 @@ PKGNAME= ${DISTNAME:L}
GH_TAGNAME= 1.0.1
GH_ACCOUNT= ConsoleKit2
GH_PROJECT= ConsoleKit2
REVISION= 0
CATEGORIES= sysutils
@ -49,7 +50,7 @@ pre-configure:
AUTOCONF_VERSION=${AUTOCONF_VERSION} \
AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \
NOCONFIGURE=1 \
/bin/sh ./autogen.sh
/bin/sh ./autogen.sh ${CONFIGURE_ARGS}
post-install:
rmdir ${WRKINST}/var/run/ConsoleKit

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-src_ck-log-event_h,v 1.1 2016/01/21 06:43:37 ajacoutot Exp $
From 845cc7cfa7566f673736723143dfb7db714ece24 Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Mon, 18 Jan 2016 17:37:41 +0100
Subject: [PATCH] Fix undefined behavior
--- src/ck-log-event.h.orig Wed Jan 13 10:12:10 2016
+++ src/ck-log-event.h Thu Jan 21 07:37:14 2016
@@ -140,7 +140,7 @@ typedef struct
{
union {
CkLogNoneEvent none;
- CkLogSystemRestartEvent system_start;
+ CkLogSystemStartEvent system_start;
CkLogSystemStopEvent system_stop;
CkLogSystemRestartEvent system_restart;
CkLogSeatAddedEvent seat_added;

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-src_ck-seat_c,v 1.1 2016/01/21 06:43:37 ajacoutot Exp $
From 718fccdcb00479da5f243af16a2cd0c1a563129f Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Fri, 15 Jan 2016 15:29:46 +0100
Subject: [PATCH] When assigning session to active VT prefer graphical sessions
--- src/ck-seat.c.orig Wed Jan 13 10:12:10 2016
+++ src/ck-seat.c Thu Jan 21 07:38:29 2016
@@ -536,9 +536,9 @@ find_session_for_display_device (CkSeat *seat,
GList *sessions;
CkSession *session;
- sessions = find_sessions_for_display_device (seat, device);
+ sessions = find_sessions_for_x11_display_device (seat, device);
if (sessions == NULL) {
- sessions = find_sessions_for_x11_display_device (seat, device);
+ sessions = find_sessions_for_display_device (seat, device);
}
if (sessions == NULL) {

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-tools_ck-log-system-start_c,v 1.4 2016/01/21 06:43:37 ajacoutot Exp $
From 845cc7cfa7566f673736723143dfb7db714ece24 Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Mon, 18 Jan 2016 17:37:41 +0100
Subject: [PATCH] Fix undefined behavior
--- tools/ck-log-system-start.c.orig Wed Jan 13 10:12:10 2016
+++ tools/ck-log-system-start.c Thu Jan 21 07:37:14 2016
@@ -249,7 +249,7 @@ main (int argc,
event.type = CK_LOG_EVENT_SYSTEM_START;
g_get_current_time (&event.timestamp);
- e = (CkLogSystemStartEvent *) &event;
+ e = (CkLogSystemStartEvent *) &event.event;
if (uname (&uts) == 0) {
e->kernel_release = uts.release;