#8850 NORM Not Tri: rainbow fails with move to use gconf as settings storage

Zarro Boogs per Child bugtracker at laptop.org
Mon Oct 20 08:24:42 EDT 2008


#8850: rainbow fails with move to use gconf as settings storage
----------------------+-----------------------------------------------------
 Reporter:  erikos    |         Owner:  mstone       
     Type:  defect    |        Status:  new          
 Priority:  normal    |     Milestone:  Not Triaged  
Component:  security  |       Version:  not specified
 Keywords:            |   Next_action:  never set    
 Verified:  0         |     Blockedby:               
 Blocking:            |  
----------------------+-----------------------------------------------------
 Rainbow fails with move to use gconf as settings storage. After reading in
 the old profile sugar does remove the old config file. The following patch
 should handle that case.

 {{{
 diff --git a/rainbow/rainbow/inject.py b/rainbow/rainbow/inject.py
 index ded283e..6cd6132 100644
 --- a/rainbow/rainbow/inject.py
 +++ b/rainbow/rainbow/inject.py
 @@ -196,11 +196,12 @@ def configure_home(spool, owner_uid, owner_gid, uid,
 gid, home):

      for frag in ['config', 'owner.key.pub']:
          path = join('.sugar/default/', frag)
 -        make_dirs(dirname(join(home, path)), uid, owner_gid, 0770)
 -        shutil.copy(join('/home/olpc', path),
 -                    join(home, path))
 -        os.chown(join(home, path), uid, owner_gid)
 -        os.chmod(join(home, path), 0770)
 +        full_path = join('/home/olpc', path)
 +        if os.path.exists(full_path):
 +            make_dirs(dirname(join(home, path)), uid, owner_gid, 0770)
 +            shutil.copy(full_path, join(home, path))
 +            os.chown(join(home, path), uid, owner_gid)
 +            os.chmod(join(home, path), 0770)

  def launch(log, home, uid, gid, argv, env, cwd, pset, safe_fds,
 strace_hint,
             preloader_hint):

 }}}

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


More information about the Bugs mailing list