This commit is contained in:
parent
5e5b724dc3
commit
f0cdea0992
@ -1,7 +1,5 @@
|
||||
Index: gnome-session-2.19.4/gnome-session/gdm-logout-action.c
|
||||
===================================================================
|
||||
--- gnome-session-2.19.4.orig/gnome-session/gdm-logout-action.c
|
||||
+++ gnome-session-2.19.4/gnome-session/gdm-logout-action.c
|
||||
--- gnome-session/gdm-logout-action.c
|
||||
+++ gnome-session/gdm-logout-action.c
|
||||
@@ -56,6 +56,8 @@
|
||||
#define GDM_ACTION_STR_REBOOT "REBOOT"
|
||||
#define GDM_ACTION_STR_SUSPEND "SUSPEND"
|
||||
@ -11,7 +9,7 @@ Index: gnome-session-2.19.4/gnome-session/gdm-logout-action.c
|
||||
typedef struct {
|
||||
int fd;
|
||||
char *auth_cookie;
|
||||
@@ -64,6 +66,8 @@ typedef struct {
|
||||
@@ -64,6 +66,8 @@
|
||||
GdmLogoutAction current_actions;
|
||||
|
||||
time_t last_update;
|
||||
@ -20,7 +18,7 @@ Index: gnome-session-2.19.4/gnome-session/gdm-logout-action.c
|
||||
} GdmProtocolData;
|
||||
|
||||
static GdmProtocolData gdm_protocol_data = {
|
||||
@@ -71,11 +75,12 @@ static GdmProtocolData gdm_protocol_data
|
||||
@@ -71,11 +75,12 @@
|
||||
NULL,
|
||||
GDM_LOGOUT_ACTION_NONE,
|
||||
GDM_LOGOUT_ACTION_NONE,
|
||||
@ -35,7 +33,7 @@ Index: gnome-session-2.19.4/gnome-session/gdm-logout-action.c
|
||||
const char *msg)
|
||||
{
|
||||
GString *retval;
|
||||
@@ -87,7 +92,7 @@ gdm_send_protocol_msg (GdmProtocolData *
|
||||
@@ -87,7 +92,7 @@
|
||||
if (write (data->fd, p, strlen (p)) < 0) {
|
||||
g_free (p);
|
||||
|
||||
@ -44,7 +42,7 @@ Index: gnome-session-2.19.4/gnome-session/gdm-logout-action.c
|
||||
g_strerror (errno));
|
||||
return NULL;
|
||||
}
|
||||
@@ -153,7 +158,7 @@ gdm_authenticate_connection (GdmProtocol
|
||||
@@ -153,7 +158,7 @@
|
||||
|
||||
msg = g_strdup_printf (GDM_PROTOCOL_MSG_AUTHENTICATE " %s",
|
||||
data->auth_cookie);
|
||||
@ -53,7 +51,7 @@ Index: gnome-session-2.19.4/gnome-session/gdm-logout-action.c
|
||||
g_free (msg);
|
||||
|
||||
if (response && !strcmp (response, "OK")) {
|
||||
@@ -195,7 +200,7 @@ gdm_authenticate_connection (GdmProtocol
|
||||
@@ -195,7 +200,7 @@
|
||||
XauDisposeAuth (xau);
|
||||
|
||||
msg = g_strdup_printf (GDM_PROTOCOL_MSG_AUTHENTICATE " %s", buffer);
|
||||
@ -62,7 +60,7 @@ Index: gnome-session-2.19.4/gnome-session/gdm-logout-action.c
|
||||
g_free (msg);
|
||||
|
||||
if (response && !strcmp (response, "OK")) {
|
||||
@@ -218,7 +223,7 @@ gdm_authenticate_connection (GdmProtocol
|
||||
@@ -218,7 +223,7 @@
|
||||
}
|
||||
|
||||
static void
|
||||
@ -71,16 +69,7 @@ Index: gnome-session-2.19.4/gnome-session/gdm-logout-action.c
|
||||
{
|
||||
if (data->fd)
|
||||
close (data->fd);
|
||||
@@ -226,7 +231,7 @@ gdm_shutdown_protocol_connection (GdmPro
|
||||
}
|
||||
|
||||
static gboolean
|
||||
-gdm_init_protocol_connection (GdmProtocolData *data)
|
||||
+dm_init_protocol_connection (GdmProtocolData *data)
|
||||
{
|
||||
struct sockaddr_un addr;
|
||||
char *response;
|
||||
@@ -237,7 +242,7 @@ gdm_init_protocol_connection (GdmProtoco
|
||||
@@ -237,7 +242,7 @@
|
||||
if (data->fd < 0) {
|
||||
g_warning ("Failed to create GDM socket: %s",
|
||||
g_strerror (errno));
|
||||
@ -89,7 +78,7 @@ Index: gnome-session-2.19.4/gnome-session/gdm-logout-action.c
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -251,16 +256,16 @@ gdm_init_protocol_connection (GdmProtoco
|
||||
@@ -251,16 +256,16 @@
|
||||
if (connect (data->fd, (struct sockaddr *) &addr, sizeof (addr)) < 0) {
|
||||
g_warning ("Failed to establish a connection with GDM: %s",
|
||||
g_strerror (errno));
|
||||
@ -109,7 +98,7 @@ Index: gnome-session-2.19.4/gnome-session/gdm-logout-action.c
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -268,7 +273,7 @@ gdm_init_protocol_connection (GdmProtoco
|
||||
@@ -268,13 +273,78 @@
|
||||
|
||||
if (!gdm_authenticate_connection (data)) {
|
||||
g_warning ("Failed to authenticate with GDM");
|
||||
@ -118,7 +107,78 @@ Index: gnome-session-2.19.4/gnome-session/gdm-logout-action.c
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -322,7 +327,21 @@ gdm_parse_query_response (GdmProtocolDat
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+static gboolean
|
||||
+kdm_init_protocol_connection (GdmProtocolData *data)
|
||||
+{
|
||||
+ struct sockaddr_un addr;
|
||||
+ char *response;
|
||||
+ char *dm_display;
|
||||
+ char *dm_control;
|
||||
+ char *p0 = NULL;
|
||||
+
|
||||
+ g_assert (data->fd <= 0);
|
||||
+
|
||||
+ data->fd = socket (AF_UNIX, SOCK_STREAM, 0);
|
||||
+ if (data->fd < 0) {
|
||||
+ g_warning ("Failed to create KDM socket: %s",
|
||||
+ g_strerror (errno));
|
||||
+ dm_shutdown_protocol_connection (data);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ dm_display = g_strdup (g_getenv ("DISPLAY"));
|
||||
+ dm_control = g_strdup (g_getenv ("DM_CONTROL"));
|
||||
+
|
||||
+ if (dm_display && (p0 = strchr (dm_display, ':')))
|
||||
+ p0 = strchr (p0, '.');
|
||||
+
|
||||
+ if (!dm_control || !strlen (dm_control) ||
|
||||
+ !dm_display || !strlen (dm_display)) {
|
||||
+ g_free (dm_control);
|
||||
+ g_free (dm_display);
|
||||
+
|
||||
+ g_warning ("Could not locate KDM socket.");
|
||||
+ dm_shutdown_protocol_connection (data);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ snprintf (addr.sun_path, sizeof (addr.sun_path), "%s/dmctl-%.*s/socket",
|
||||
+ dm_control, p0 ? p0 - dm_display : 512, dm_display);
|
||||
+ addr.sun_family = AF_UNIX;
|
||||
+
|
||||
+ g_free (dm_display);
|
||||
+ g_free (dm_control);
|
||||
+
|
||||
+ if (connect (data->fd, (struct sockaddr *) &addr, sizeof (addr)) < 0) {
|
||||
+ g_warning ("Failed to establish a connection with KDM: %s",
|
||||
+ g_strerror (errno));
|
||||
+ dm_shutdown_protocol_connection (data);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+static gboolean
|
||||
+dm_init_protocol_connection (GdmProtocolData *data)
|
||||
+{
|
||||
+ if (g_getenv ("DM_CONTROL") && !g_getenv ("GDMSESSION")) {
|
||||
+ data->is_kdm = TRUE;
|
||||
+ return kdm_init_protocol_connection (data);
|
||||
+ }
|
||||
+
|
||||
+ data->is_kdm = FALSE;
|
||||
+ return gdm_init_protocol_connection (data);
|
||||
+}
|
||||
+
|
||||
+
|
||||
static void
|
||||
gdm_parse_query_response (GdmProtocolData *data,
|
||||
const char *response)
|
||||
@@ -322,7 +392,21 @@
|
||||
}
|
||||
|
||||
static void
|
||||
@ -141,7 +201,7 @@ Index: gnome-session-2.19.4/gnome-session/gdm-logout-action.c
|
||||
{
|
||||
time_t current_time;
|
||||
char *response;
|
||||
@@ -333,21 +352,30 @@ gdm_update_logout_actions (GdmProtocolDa
|
||||
@@ -333,21 +417,30 @@
|
||||
|
||||
data->last_update = current_time;
|
||||
|
||||
@ -180,7 +240,7 @@ Index: gnome-session-2.19.4/gnome-session/gdm-logout-action.c
|
||||
|
||||
return (gdm_protocol_data.available_actions & action) != 0;
|
||||
}
|
||||
@@ -355,20 +383,15 @@ gdm_supports_logout_action (GdmLogoutAct
|
||||
@@ -355,20 +448,15 @@
|
||||
GdmLogoutAction
|
||||
gdm_get_logout_action (void)
|
||||
{
|
||||
@ -204,7 +264,7 @@ Index: gnome-session-2.19.4/gnome-session/gdm-logout-action.c
|
||||
|
||||
switch (action) {
|
||||
case GDM_LOGOUT_ACTION_NONE:
|
||||
@@ -385,14 +408,48 @@ gdm_set_logout_action (GdmLogoutAction a
|
||||
@@ -385,14 +473,48 @@
|
||||
break;
|
||||
}
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 13 05:02:54 CEST 2007 - cgaisford@novell.com
|
||||
|
||||
- Fixed up kdm-support patch to support gnome sessions in KDM
|
||||
Novell Bug #308022
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 10 20:57:01 CEST 2007 - maw@suse.de
|
||||
|
||||
|
@ -16,7 +16,7 @@ BuildRequires: CASA-devel control-center2-devel fdupes gnome-common gnome-deskt
|
||||
License: GPL v2 or later, LGPL v2 or later
|
||||
Group: System/GUI/GNOME
|
||||
Version: 2.19.92
|
||||
Release: 1
|
||||
Release: 4
|
||||
Summary: Session Tools for the GNOME 2.x Desktop
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
Source1: gnome
|
||||
@ -49,7 +49,7 @@ Patch3: gnome-session-remove-dns-warning.patch
|
||||
Patch4: gnome-session-2.12.0-xgl-display-modal-2.patch
|
||||
Patch5: gnome-session-2.12.0-su-session-management.patch
|
||||
Patch6: gnome-session-2.12.0-unlock-keyring.patch
|
||||
Patch7: gnome-session-2.12.0-kdm-support.patch
|
||||
Patch7: gnome-session-2.19.92-kdm-support.patch
|
||||
Patch8: gnome-session-motd.patch
|
||||
Patch9: gnome-session-dist-splash.patch
|
||||
Patch10: gnome-session-compiz.patch
|
||||
@ -99,7 +99,7 @@ gnome-patch-translation-prepare
|
||||
%patch5 -p1
|
||||
#%patch6 -p1
|
||||
%if %suse_version > 1000
|
||||
%patch7 -p1
|
||||
%patch7
|
||||
%patch8
|
||||
%patch9 -p0
|
||||
%patch10
|
||||
@ -163,6 +163,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%files lang -f %{name}-2.0.lang
|
||||
|
||||
%changelog
|
||||
* Thu Sep 13 2007 - cgaisford@novell.com
|
||||
- Fixed up kdm-support patch to support gnome sessions in KDM
|
||||
Novell Bug #308022
|
||||
* Mon Sep 10 2007 - maw@suse.de
|
||||
- Update to versino 2.19.92:
|
||||
+ Fix compiz support in gnome-wm
|
||||
|
Loading…
Reference in New Issue
Block a user