Changeset 1411


Ignore:
Timestamp:
Oct 28, 2008, 11:17:24 PM (15 years ago)
Author:
broder
Message:

Don't proxy requests for the VNC cert if the requested hostname isn't
an Invirt host

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

Legend:

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

    r1409 r1411  
     1invirt-remote-server (0.0.11) unstable; urgency=low
     2
     3  * Don't proxy requests for the VNC cert if the requested hostname isn't
     4    an Invirt host
     5
     6 -- Evan Broder <broder@mit.edu>  Tue, 28 Oct 2008 23:17:10 -0400
     7
    18invirt-remote-server (0.0.10) unstable; urgency=low
    29
  • trunk/packages/invirt-remote-server/files/usr/sbin/invirt-remote-vnccert

    r1402 r1411  
    1 #!/bin/bash
    2 # Get the VNC cert for the host passed as the first argument
     1#!/usr/bin/python
    32
    4 klist -s || kinit -k
     3"""
     4Retrieves the VNC certificate from an Invirt host
     5"""
    56
    6 exec remctl "$1" remote web vnccert
     7from invirt.config import structs as config
     8from subprocess import Popen, call, PIPE
     9import sys
     10
     11
     12def main(argv):
     13    if len(argv) < 2:
     14        print >> sys.stderr, "usage: invirt-remote-vnccert <host>"
     15        return 2
     16   
     17    host = argv[1]
     18   
     19    if host not in list(i.hostname for i in config.hosts):
     20        print >> sys.stderr, "Invalid hostname specified"
     21        return 1
     22   
     23    return call(['remctl', host, 'remote', 'web', 'vnccert'])
     24
     25if __name__ == '__main__':
     26    sys.exit(main(sys.argv))
Note: See TracChangeset for help on using the changeset viewer.