X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/88448d9221a686ce71cb0f465888d84a1a6ece19..04849845c49a37671b5aab3bedfa3b287e6d13f3:/code/main.py diff --git a/code/main.py b/code/main.py index 70e8912..540b3f4 100755 --- a/code/main.py +++ b/code/main.py @@ -388,7 +388,6 @@ def modifyDict(username, state, fields): session.save_or_update(machine) if update_acl: - print >> sys.stderr, machine, machine.administrator cache_acls.refreshMachine(machine) session.commit() except: @@ -427,11 +426,24 @@ def helpHandler(username, state, path, fields): simple = fields.getfirst('simple') subjects = fields.getlist('subject') - help_mapping = {'ParaVM Console': """ + help_mapping = { + 'Autoinstalls': """ +The autoinstaller builds a minimal Debian or Ubuntu system to run as a +ParaVM. You can access the resulting system by logging into the serial console server +with your Kerberos tickets; there is no root password so sshd will +refuse login.

+ +

Under the covers, the autoinstaller uses our own patched version of +xen-create-image, which is a tool based on debootstrap. If you log +into the serial console while the install is running, you can watch +it. +""", + 'ParaVM Console': """ ParaVM machines do not support local console access over VNC. To access the serial console of these machines, you can SSH with Kerberos -to console.%s, using the name of the machine as your -username.""" % config.dns.domains[0], +to %s, using the name of the machine as your +username.""" % config.console.hostname, 'HVM/ParaVM': """ HVM machines use the virtualization features of the processor, while ParaVM machines use Xen's emulation of virtualization features. You @@ -652,7 +664,18 @@ def show_error(op, username, fields, err, emsg, traceback): def getUser(environ): """Return the current user based on the SSL environment variables""" - return environ.get('REMOTE_USER', None) + user = environ.get('REMOTE_USER') + if user is None: + return + + if environ.get('AUTH_TYPE') == 'Negotiate': + # Convert the krb5 principal into a krb4 username + if not user.endswith('@%s' % config.authn[0].realm): + return + else: + return user.split('@')[0].replace('/', '.') + else: + return user def handler(username, state, path, fields): operation, path = pathSplit(path)