tkey mgmt perms - gitzone - git-based zone management tool for static and dynamic domains
HTML git clone https://git.parazyd.org/gitzone
DIR Log
DIR Files
DIR Refs
---
DIR commit 34fb5aa87889294956a13bbb2a018a4a7b278919
DIR parent 99781eebd97abf5801ba3a71712e20d0bf3a7400
HTML Author: tg(x) <*@tg-x.net>
Date: Fri, 4 Feb 2011 05:39:02 +0100
key mgmt perms
Diffstat:
M bin/gitzone-shell | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
DIR diff --git a/bin/gitzone-shell b/bin/gitzone-shell
t@@ -1,9 +1,9 @@
#!/bin/sh
-# only repo allowed for git pull/push
+# only repo allowed for git pull/push
repo='zones'
-# allow ssh key add/del/list commands
-allow_key_management=1
+# allow ssh key add/del/list commands if this file exists
+allow_key_mgmt_file='.ssh/authorized_keys_edit_allowed'
# paths
git_shell=/usr/bin/git-shell
t@@ -25,7 +25,7 @@ elif [[ "$cmd" == git-receive-pack* ]]; then
$git_shell -c "git-receive-pack '$repo'"
elif [[ "$cmd" == update-record* ]]; then
$gitzone $config update-record "$cmd"
-elif [ "$allow_key_management" == 1 ]; then
+elif [ -f $allow_key_mgmt_file ]; then
if [ "$cmd" == list-keys ]; then
cat .ssh/authorized_keys
elif [[ "$cmd" == add-key* ]]; then