diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitano/usercommand.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitano/usercommand.lua b/lib/gitano/usercommand.lua index 3816f36..e33921a 100644 --- a/lib/gitano/usercommand.lua +++ b/lib/gitano/usercommand.lua @@ -161,6 +161,10 @@ local function builtin_sshkey_prep(config, _, cmdline, context) if not utab.keys[cmdline[3]] then return "deny", "Key tag " .. cmdline[3] .. " does not exist" end + -- And that it's not the one we're currently using + if cmdline[3] == context.keytag then + return "deny", "Key tag " .. cmdline[3] .. " is in use" + end end return action, reason end |