/tmp/at-spi2 should be created with permissions of 0x1777
authorMike Gorse <mgorse@novell.com>
Sun, 6 Feb 2011 20:10:09 +0000 (14:10 -0600)
committerMike Gorse <mgorse@novell.com>
Sun, 6 Feb 2011 20:10:38 +0000 (14:10 -0600)
atk-adaptor/bridge.c

index 0baf6f8..d03f0c3 100644 (file)
@@ -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