Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2008-01-11 18:40:35 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2008-01-11 18:40:35 (GMT)
commit0eb65f82a5c244d0a0444b7d49f3d4139f2f03a3 (patch)
treec91165271c957404bfde4726cf3f6f20f5a65ccf
parentdc0b6d8841c850af545f4fe5e3c9d284b9d6e55a (diff)
Make the fix for #5586 work with security.
-rw-r--r--Area.py6
-rw-r--r--NEWS2
2 files changed, 6 insertions, 2 deletions
diff --git a/Area.py b/Area.py
index d1a25ee..e2ba9da 100644
--- a/Area.py
+++ b/Area.py
@@ -621,8 +621,9 @@ class Area(gtk.DrawingArea):
@param self -- the Area object (GtkDrawingArea)
"""
clipBoard = gtk.Clipboard()
- temp_dir = os.environ.get('SUGAR_ACTIVITY_ROOT', None)
- if temp_dir is None:
+ if 'SUGAR_ACTIVITY_ROOT' in os.environ:
+ temp_dir = os.path.join(os.environ.get('SUGAR_ACTIVITY_ROOT'), 'instance')
+ else:
temp_dir = '/tmp'
f, tempPath = tempfile.mkstemp(suffix='.png', dir=temp_dir)
@@ -633,6 +634,7 @@ class Area(gtk.DrawingArea):
pixbuf_copy = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB,True,8,size[0],size[1])
pixbuf_copy.get_from_drawable(self.pixmap_sel, gtk.gdk.colormap_get_system(),0,0,0,0,size[0],size[1])
pixbuf_copy.save(tempPath,'png')
+ os.chmod(tempPath, 0604)
clipBoard.set_with_data( [('text/uri-list', 0, 0)], self._copyGetFunc, self._copyClearFunc, tempPath)
else :
diff --git a/NEWS b/NEWS
index 765e8a2..4e4d40d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+* Make the fix for #5586 work with security. (tomeu)
+
16
* #5586: Copy clippings as text/uri-list. (tomeu)