Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Silbe <sascha-pgp@silbe.org>2010-10-17 19:33:44 (GMT)
committer Michael Stone <michael@laptop.org>2010-12-19 00:09:26 (GMT)
commitec4e61dfa8adc85ec7371b11ea582585c50a0d71 (patch)
tree5d5d31c85b03412e82bacc1952637359e285b0ee
parent11afc83ff0d2558210065539ba7675f639b9fa04 (diff)
rainbow-sugarize: tweak permissions for Orbit unix socket (SL#2458)ss/orbit
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.
-rwxr-xr-xbin/rainbow-sugarize10
1 files changed, 8 insertions, 2 deletions
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)