Bastien Nocera af52880
From 901fe4058f776cefb4cbea0bd160d2fd1b7f9d3b Mon Sep 17 00:00:00 2001
Bastien Nocera af52880
From: Mike Gorse <mgorse@novell.com>
Bastien Nocera af52880
Date: Sun, 6 Feb 2011 14:10:09 -0600
Bastien Nocera af52880
Subject: [PATCH 2/2] /tmp/at-spi2 should be created with permissions of 0x1777
Bastien Nocera af52880
Bastien Nocera af52880
---
Bastien Nocera af52880
 atk-adaptor/bridge.c |   13 +++++++------
Bastien Nocera af52880
 1 files changed, 7 insertions(+), 6 deletions(-)
Bastien Nocera af52880
Bastien Nocera af52880
diff --git a/atk-adaptor/bridge.c b/atk-adaptor/bridge.c
Bastien Nocera af52880
index 0baf6f8..d03f0c3 100644
Bastien Nocera af52880
--- a/atk-adaptor/bridge.c
Bastien Nocera af52880
+++ b/atk-adaptor/bridge.c
Bastien Nocera af52880
@@ -317,13 +317,14 @@ register_application (SpiBridge * app)
Bastien Nocera af52880
   if (message)
Bastien Nocera af52880
     dbus_message_unref (message);
Bastien Nocera af52880
 
Bastien Nocera af52880
-/* could this be better, we accept some amount of race in getting the temp name*/
Bastien Nocera af52880
-/* make sure the directory exists */
Bastien Nocera af52880
-mkdir("/tmp/at-spi2/", S_IRWXU);
Bastien Nocera af52880
-app->app_bus_addr = g_malloc(max_addr_length * sizeof(char));
Bastien Nocera af52880
+  /* could this be better, we accept some amount of race in getting the temp name*/
Bastien Nocera af52880
+  /* make sure the directory exists */
Bastien Nocera af52880
+  mkdir ("/tmp/at-spi2/", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX);
Bastien Nocera af52880
+  chmod ("/tmp/at-spi2/", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX);
Bastien Nocera af52880
+  app->app_bus_addr = g_malloc(max_addr_length * sizeof(char));
Bastien Nocera af52880
 #ifndef DISABLE_P2P
Bastien Nocera af52880
-sprintf(app->app_bus_addr, "unix:path=/tmp/at-spi2/socket-%d-%d", getpid(),
Bastien Nocera af52880
-rand());
Bastien Nocera af52880
+  sprintf (app->app_bus_addr, "unix:path=/tmp/at-spi2/socket-%d-%d", getpid(),
Bastien Nocera af52880
+           rand());
Bastien Nocera af52880
 #else
Bastien Nocera af52880
   app->app_bus_addr [0] = '\0';
Bastien Nocera af52880
 #endif
Bastien Nocera af52880
-- 
Bastien Nocera af52880
1.7.4
Bastien Nocera af52880