From fb9da76837c796a4b0b4869ed44610e4c4320d63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Fri, 2 Aug 2019 03:17:32 +0200 Subject: [PATCH] only key ID from ssh-certificate is used --- gitosis/principals.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/gitosis/principals.py b/gitosis/principals.py index 33e478b..6001b67 100644 --- a/gitosis/principals.py +++ b/gitosis/principals.py @@ -22,13 +22,8 @@ def serve_principal(cfg, sshUser, principals): TEMPLATE=('command="gitosis-serve %(user)s",no-port-forwarding,' +'no-X11-forwarding,no-agent-forwarding,no-pty %(principals)s') - if '@' in sshUser: - for user in [ sshUser.split('@')[0] ]: - print TEMPLATE % dict(user=user, - principals=util.getAllowedSSHPrincipals(config=cfg)) - else: - print TEMPLATE % dict(user=sshUser, - principals=util.getAllowedSSHPrincipals(config=cfg)) + print TEMPLATE % dict(user=sshUser, + principals=util.getAllowedSSHPrincipals(config=cfg)) class Main(app.App):