[at-spi2-atk] /tmp/at-spi2 should be created with permissions of 0x1777



commit 901fe4058f776cefb4cbea0bd160d2fd1b7f9d3b
Author: Mike Gorse <mgorse novell com>
Date:   Sun Feb 6 14:10:09 2011 -0600

    /tmp/at-spi2 should be created with permissions of 0x1777

 atk-adaptor/bridge.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/atk-adaptor/bridge.c b/atk-adaptor/bridge.c
index 0baf6f8..d03f0c3 100644
--- a/atk-adaptor/bridge.c
+++ b/atk-adaptor/bridge.c
@@ -317,13 +317,14 @@ 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);
-app->app_bus_addr = g_malloc(max_addr_length * sizeof(char));
+  /* 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());
+  sprintf (app->app_bus_addr, "unix:path=/tmp/at-spi2/socket-%d-%d", getpid(),
+           rand());
 #else
   app->app_bus_addr [0] = '\0';
 #endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]