Mailinglist Archive: opensuse-commit (1083 mails)

< Previous Next >
commit gnome-session
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Thu, 13 Sep 2007 10:29:49 +0200
  • Message-id: <20070913082950.02A5D6781B8@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package gnome-session
checked in at Thu Sep 13 10:29:49 CEST 2007.

--------
--- GNOME/gnome-session/gnome-session.changes   2007-09-10 20:57:28.000000000 +0200
+++ /mounts/work_src_done/STABLE/gnome-session/gnome-session.changes    2007-09-13 05:03:46.147927000 +0200
@@ -1,0 +2,6 @@
+Thu Sep 13 05:02:54 CEST 2007 - cgaisford@xxxxxxxxxx
+
+- Fixed up kdm-support patch to support gnome sessions in KDM
+  Novell Bug #308022
+
+-------------------------------------------------------------------

Old:
----
  gnome-session-2.12.0-kdm-support.patch

New:
----
  gnome-session-2.19.92-kdm-support.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gnome-session.spec ++++++
--- /var/tmp/diff_new_pack.PB2001/_old  2007-09-13 10:29:17.000000000 +0200
+++ /var/tmp/diff_new_pack.PB2001/_new  2007-09-13 10:29:17.000000000 +0200
@@ -16,7 +16,7 @@
 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 @@
 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 @@
 %patch5 -p1
 #%patch6 -p1
 %if %suse_version > 1000
-%patch7 -p1
+%patch7 
 %patch8
 %patch9 -p0
 %patch10
@@ -163,6 +163,9 @@
 %files lang -f %{name}-2.0.lang
 
 %changelog
+* Thu Sep 13 2007 - cgaisford@xxxxxxxxxx
+- Fixed up kdm-support patch to support gnome sessions in KDM
+  Novell Bug #308022
 * Mon Sep 10 2007 - maw@xxxxxxx
 - Update to versino 2.19.92:
   + Fix compiz support in gnome-wm



++++++ gnome-session-2.12.0-kdm-support.patch -> gnome-session-2.19.92-kdm-support.patch ++++++
--- GNOME/gnome-session/gnome-session-2.12.0-kdm-support.patch  2007-09-07 22:34:15.000000000 +0200
+++ /mounts/work_src_done/STABLE/gnome-session/gnome-session-2.19.92-kdm-support.patch  2007-09-12 23:26:58.836991000 +0200
@@ -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 @@
  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 @@
  } 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 @@
                         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 @@
                             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 @@
                  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 @@
                  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 @@
  {
          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 @@
                  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 @@
  
                  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 @@
                  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 @@
  {
          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 @@
  
          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 @@
  
          switch (action) {
          case GDM_LOGOUT_ACTION_NONE:
-@@ -385,14 +408,48 @@ gdm_set_logout_action (GdmLogoutAction a
+@@ -385,14 +473,48 @@
                  break;
          }
  


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >