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

« back to all changes in this revision

Viewing changes to www/apps/consoleservice/__init__.py

  • Committer: drtomc
  • Date: 2008-02-13 01:22:48 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:442
util.js: Small fix for make_query_string.

console: get the uid from the session object, rather than looking in /etc/passwd.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
    working_dir = os.path.join("/home", req.username)   # Within jail
62
62
 
63
63
    # Get the UID of the logged-in user
64
 
    try:
65
 
        (_,_,uid,_,_,_,_) = pwd.getpwnam(req.username)
66
 
    except KeyError:
67
 
        # The user does not exist. This should have already failed the
68
 
        # previous test.
69
 
        req.throw_error(req.HTTP_INTERNAL_SERVER_ERROR)
 
64
    uid = req.get_session()['unixid']
70
65
 
71
66
    # Set request attributes
72
67
    req.content_type = "text/plain"