Ignore:
Timestamp:
Jan 8, 2009, 4:19:47 PM (16 years ago)
Author:
quentin
Message:

Include the VNC host and port in the VNC authentication token

Location:
trunk/packages/invirt-vnc-server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-vnc-server/debian/changelog

    r1528 r1965  
     1invirt-vnc-server (0.0.6) unstable; urgency=low
     2
     3  * Include the VNC host and port in the authentication token
     4
     5  -- Quentin Smith <quentin@mit.edu>  Thu, 08 Jan 2009 16:15:46 -0500
     6
    17invirt-vnc-server (0.0.5) unstable; urgency=low
    28
  • trunk/packages/invirt-vnc-server/invirt-vnc-authtoken

    r1389 r1965  
    99import base64
    1010from invirt.vnc import getTokenKey
     11from invirt.config import structs as config
    1112
    1213def getAuthToken(username, machine, lifetime=5*60):
     
    1516    data['machine'] = machine
    1617    data['expires'] = time.time() + lifetime
     18    data['connect_host'] = config.web.hostname
     19    try:
     20        data['connect_port'] = 10003 + [h.hostname for h in
     21                                        config.hosts].index(os.uname()[1])
     22    except:
     23        data['connect_port'] = 5900
    1724    pickled_data = cPickle.dumps(data)
    1825    m = hmac.new(getTokenKey(), digestmod=sha)
Note: See TracChangeset for help on using the changeset viewer.