Hello community,

here is the log from the commit of package at-spi2-atk for openSUSE:Factory 
checked in at 2012-07-09 07:53:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/at-spi2-atk (Old)
 and      /work/SRC/openSUSE:Factory/.at-spi2-atk.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "at-spi2-atk", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/at-spi2-atk/at-spi2-atk.changes  2012-03-29 
11:34:45.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.at-spi2-atk.new/at-spi2-atk.changes     
2012-07-09 07:53:25.000000000 +0200
@@ -1,0 +2,6 @@
+Fri Jul  6 07:34:39 UTC 2012 - [email protected]
+
+- Add at-spi2-atk-bnc770177: Use XDG_RUNTIME_DIR to hold sockets,
+  and do not make a world-writable dir (bnc#770177).
+
+-------------------------------------------------------------------

New:
----
  at-spi2-atk-bnc770177

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

Other differences:
------------------
++++++ at-spi2-atk.spec ++++++
--- /var/tmp/diff_new_pack.B5Kxqs/_old  2012-07-09 07:53:26.000000000 +0200
+++ /var/tmp/diff_new_pack.B5Kxqs/_new  2012-07-09 07:53:26.000000000 +0200
@@ -25,6 +25,8 @@
 Url:            http://www.gnome.org/
 Source0:        
http://download.gnome.org/sources/at-spi2-atk/2.4/%{name}-%{version}.tar.xz
 Source99:       %{name}-rpmlintrc
+# PATCH-FIX-UPSTREAM at-spi2-atk-bnc770177 bgo#678348 bnc#770017 
[email protected] -- Use XDG_RUNTIME_DIR to hold sockets, and do not make a 
world-writable dir. Patch taken from upstream git, commit e4f3ee.
+Patch0:         at-spi2-atk-bnc770177
 BuildRequires:  atk-devel >= 2.1.5
 BuildRequires:  fdupes
 BuildRequires:  gtk2-devel
@@ -92,6 +94,7 @@
 %lang_package
 %prep
 %setup -q
+%patch0 -p1
 translation-update-upstream
 
 %if 0%{?BUILD_FROM_VCS}


++++++ at-spi2-atk-bnc770177 ++++++
commit e4f3eee2e137cd34cd427875365f458c65458164
Author: Mike Gorse <[email protected]>
Date:   Thu Jun 21 16:56:40 2012 -0500

    Use XDG_RUNTIME_DIR to hold sockets, and do not make a world-writable dir
    
    If we use XDG_RUNTIME_DIR, then the directory should be owned by the
    appropriate user, so it should not need to be world-writable. Hopefully this
    won't break accessibility for administrative apps on some distro.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=678348

diff --git a/atk-adaptor/adaptors/application-adaptor.c 
b/atk-adaptor/adaptors/application-adaptor.c
index 1b85969..dc2231d 100644
--- a/atk-adaptor/adaptors/application-adaptor.c
+++ b/atk-adaptor/adaptors/application-adaptor.c
@@ -110,6 +110,8 @@ if (reply)
       const char *retval = (g_getenv ("AT_SPI_CLIENT") ?
                             "":
                             spi_global_app_data->app_bus_addr);
+      if (!retval)
+        retval = "";
       dbus_message_append_args(reply, DBUS_TYPE_STRING, &retval, 
DBUS_TYPE_INVALID);
     }
 
diff --git a/atk-adaptor/bridge.c b/atk-adaptor/bridge.c
index 69527c6..8c9d6bc 100644
--- a/atk-adaptor/bridge.c
+++ b/atk-adaptor/bridge.c
@@ -270,7 +270,6 @@ register_application (SpiBridge * app)
   DBusMessageIter iter;
   DBusError error;
   DBusPendingCall *pending;
-  const int max_addr_length = 128; /* should be long enough */
 
   dbus_error_init (&error);
 
@@ -298,16 +297,16 @@ register_application (SpiBridge * app)
   if (message)
     dbus_message_unref (message);
 
-  /* could this be better, we accept some amount of race in getting the temp 
name*/
-  /* make sure the directory exists */
-  mkdir ("/tmp/at-spi2/", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX);
-  chmod ("/tmp/at-spi2/", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX);
-  app->app_bus_addr = g_malloc(max_addr_length * sizeof(char));
 #ifndef DISABLE_P2P
-  sprintf (app->app_bus_addr, "unix:path=/tmp/at-spi2/socket-%d-%d", getpid(),
-           rand());
-#else
-  app->app_bus_addr [0] = '\0';
+  app->app_tmp_dir = g_build_filename (g_get_user_runtime_dir (),
+                                       "at-spi2-XXXXXX", NULL);
+  if (!g_mkdtemp (app->app_tmp_dir))
+  {
+    g_free (app->app_tmp_dir);
+    app->app_tmp_dir = NULL;
+    return FALSE;
+  }
+  app->app_bus_addr = g_strdup_printf ("unix:path=%s/socket", 
app->app_tmp_dir);
 #endif
 
   return TRUE;
@@ -338,6 +337,20 @@ deregister_application (SpiBridge * app)
   dbus_connection_send (app->bus, message, NULL);
   if (message)
     dbus_message_unref (message);
+
+  if (app->app_bus_addr)
+  {
+    unlink (app->app_bus_addr);
+    g_free (app->app_bus_addr);
+    app->app_bus_addr = NULL;
+  }
+
+  if (app->app_tmp_dir)
+  {
+    rmdir (app->app_tmp_dir);
+    g_free (app->app_tmp_dir);
+    app->app_tmp_dir = NULL;
+  }
 }
 
 /*---------------------------------------------------------------------------*/
@@ -525,6 +538,9 @@ setup_bus (void)
   DBusServer *server;
   DBusError err;
 
+  if (!spi_global_app_data->app_bus_addr)
+    return -1;
+
   dbus_error_init(&err);
   server = dbus_server_listen(spi_global_app_data->app_bus_addr, &err);
   if (server == NULL)
diff --git a/atk-adaptor/bridge.h b/atk-adaptor/bridge.h
index c24183e..2a79c6d 100644
--- a/atk-adaptor/bridge.h
+++ b/atk-adaptor/bridge.h
@@ -59,7 +59,8 @@ struct _SpiBridge
 */
   gchar *desktop_name;
   gchar *desktop_path;
-char *app_bus_addr;
+gchar *app_tmp_dir;
+gchar *app_bus_addr;
   GList *events;
   gboolean events_initialized;
 };
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to