~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/console/service.py

  • Committer: David Coles
  • Date: 2009-12-02 19:16:46 UTC
  • mfrom: (1332.1.4 console-fix)
  • Revision ID: coles.david@gmail.com-20091202191646-e55k83yd7sera1fk
When a console is restarted due to either being reset from the UI or killed 
due to inactivity/resource limits then will restart at the correct working 
directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
                                     "magic": cons.magic}).encode('hex')}
61
61
 
62
62
    @named_operation('use')
63
 
    def chat(self, req, key, text='', kind="chat"):
 
63
    def chat(self, req, key, text='', cwd='', kind="chat"):
64
64
        # The request *should* have the following four fields:
65
65
        # key: Hex JSON dict of host and port where the console server lives,
66
66
        # and the secret to use to digitally sign the communication with the
78
78
 
79
79
        jail_path = os.path.join(req.config['paths']['jails']['mounts'],
80
80
                                 req.user.login)
81
 
        working_dir = os.path.join("/home", req.user.login)   # Within jail
 
81
        # Within Jail
 
82
        working_dir = os.path.join("/home", req.user.login, cwd)
82
83
        uid = req.user.unixid
83
84
 
84
85
        # XXX: JSONRESTView should do this for us.