#6405 BLOC Update.: Can't add photo to write doc

Zarro Boogs per Child bugtracker at laptop.org
Wed Feb 13 17:58:59 EST 2008


#6405: Can't add photo to write doc
-----------------------+----------------------------------------------------
  Reporter:  kimquirk  |       Owner:  mstone                      
      Type:  defect    |      Status:  new                         
  Priority:  blocker   |   Milestone:  Update.1                    
 Component:  security  |     Version:                              
Resolution:            |    Keywords:  rainbow-integration, review?
  Verified:  0         |    Blocking:                              
 Blockedby:            |  
-----------------------+----------------------------------------------------
Changes (by tomeu):

  * keywords:  rainbow-integration => rainbow-integration, review?


Comment:

 Well, activities are not in fault here. The clipboard service was copying
 the handed file in a way that it had 0600 permissions. Before Rainbow
 landed, all activities ran in the same user so there was no problem.

 This patch will allow activities to read the clippings:

 {{{
 diff --git a/service/clipboardservice.py b/service/clipboardservice.py
 index fec546f..32132b8 100644
 --- a/service/clipboardservice.py
 +++ b/service/clipboardservice.py
 @@ -200,6 +200,7 @@ class ClipboardService(dbus.service.Object):
          f, new_file_path = tempfile.mkstemp(ext, root)
          del f
          shutil.copyfile(uri.path, new_file_path)
 +        os.chmod(new_file_path, 0604)

          return 'file://' + new_file_path

 }}}

-- 
Ticket URL: <http://dev.laptop.org/ticket/6405#comment:3>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list