Index: trunk/packages/invirt-web/code/main.py
===================================================================
--- trunk/packages/invirt-web/code/main.py	(revision 1634)
+++ trunk/packages/invirt-web/code/main.py	(revision 1642)
@@ -653,5 +653,16 @@
 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):
