From 8f03e69d81ac52593afc7b4e0fd05f66f383b1ba Mon Sep 17 00:00:00 2001 From: clime Date: Thu, 2 Feb 2017 15:16:42 +0100 Subject: [PATCH] add kerberos support for lookaside-cache uploading --- scripts/httpd/upload.cgi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/httpd/upload.cgi b/scripts/httpd/upload.cgi index 2b000a6..7f7ba31 100644 --- a/scripts/httpd/upload.cgi +++ b/scripts/httpd/upload.cgi @@ -100,6 +100,9 @@ def main(): os.umask(002) username = os.environ.get('SSL_CLIENT_S_DN_CN', None) + gssname = os.environ.get('GSS_NAME', None) + if gssname and '@' in gssname and not username: + username = gssname.partition('@')[0] if not check_auth(username): send_error('You must connect with a valid certificate and be in the ' '%s group to upload.' % PACKAGER_GROUP,