From ec4e61dfa8adc85ec7371b11ea582585c50a0d71 Mon Sep 17 00:00:00 2001 From: Sascha Silbe Date: Sun, 17 Oct 2010 19:33:44 +0000 Subject: rainbow-sugarize: tweak permissions for Orbit unix socket (SL#2458) Sugar activities needs access to GConf which still uses CORBA. Because a new socket is created for each session and gconfd is auto-activated by dbus, we cannot change the permissions in ~/.xsession. This will give activities write access to the entire GConf-based user configuration, but as GConf is in the process of getting phased out anyway that's good enough. --- diff --git a/bin/rainbow-sugarize b/bin/rainbow-sugarize index 275d164..ec0f119 100755 --- a/bin/rainbow-sugarize +++ b/bin/rainbow-sugarize @@ -3,8 +3,8 @@ import sys import pwd -from os import getuid, getgid, environ, chmod, chown, symlink -from os.path import join, isdir, dirname +from os import getuid, getgid, environ, chmod, chown, symlink, listdir +from os.path import join, isdir, dirname, exists from optparse import OptionParser from shutil import copyfile @@ -66,6 +66,12 @@ def main(): chmod(ice_cookie_path, 0666) chown(ice_cookie_path, o.pw_uid, i.pw_gid) + corba_socket_path = join('/tmp', 'orbit-' + o.pw_name) + if exists(corba_socket_path): + chmod(corba_socket_path, 0750) + for socket_name in listdir(corba_socket_path): + chmod(join(corba_socket_path, socket_name), 0660) + for frag in ['owner.key.pub']: path = join('.sugar/default/', frag) make_dirs(dirname(join(h_i, path)), getuid(), getgid(), 0777) -- cgit v0.9.1