diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2016-01-12 23:48:31 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2016-01-12 23:48:31 -0800 |
commit | 71abc8579a2598add1b938a62ba09845adc9de31 (patch) | |
tree | 00268d6d4b805b1621840624fba9882018e8feef | |
parent | Merge remote-tracking branch 'upstream/master' (diff) | |
parent | ssh-authkeys-split: avoid creating invalid keyfiles (diff) | |
download | gitolite-gentoo-71abc8579a2598add1b938a62ba09845adc9de31.tar.gz gitolite-gentoo-71abc8579a2598add1b938a62ba09845adc9de31.tar.bz2 gitolite-gentoo-71abc8579a2598add1b938a62ba09845adc9de31.zip |
Merge remote-tracking branch 'upstream/master'
-rwxr-xr-x | src/triggers/post-compile/ssh-authkeys-split | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/triggers/post-compile/ssh-authkeys-split b/src/triggers/post-compile/ssh-authkeys-split index b978ef5..bf8c8e7 100755 --- a/src/triggers/post-compile/ssh-authkeys-split +++ b/src/triggers/post-compile/ssh-authkeys-split @@ -18,8 +18,6 @@ # - assumes you don't have a subdir in keydir called "__split_keys__" -# - God help you if you try to throw in a putty key in there. - # - RUNNING "GITOLITE SETUP" WILL LOSE ALL THESE KEYS. So if you ever do # that, you will then need to make a dummy push to the admin repo to add # them back. If all your **admin** keys were in split keys, then you lost @@ -30,8 +28,7 @@ # SUPPORT # ------- # -# NONE. Mainly because I **know** someone will throw in a putty key. I just -# know it. +# NONE. # USAGE # ----- @@ -63,7 +60,14 @@ do seq=1 while read line do - echo "$line" > $SKD/$base@$seq.pub + f=$SKD/$base@$seq.pub + echo "$line" > $f + # similar sanity check as main ssh-authkeys script + if ! ssh-keygen -l -f $f + then + echo 1>&2 "ssh-authkeys-split: bad line $seq in keydir/$k" + rm -f $f + fi (( seq++ )) done < $k |