summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2016-12-03 17:08:33 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2016-12-03 17:08:33 +0000
commitd088b8644552f4e9841e066d541431350659e38a (patch)
treecd1a77a10fb061265cb06d46085133980bd2661c /lib
parentede13a945f93608fbebcd15c4e599b7d2f473e6f (diff)
downloadgitano-d088b8644552f4e9841e066d541431350659e38a.tar.gz
If you try to sshkey del the key you're using, you get told you can't
Diffstat (limited to 'lib')
-rw-r--r--lib/gitano/usercommand.lua4
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