]> git.wh0rd.org - home.git/commitdiff
make sure keys are 600 before adding
authorMike Frysinger <vapier@gentoo.org>
Sun, 15 Jun 2014 01:20:04 +0000 (21:20 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sun, 15 Jun 2014 01:20:04 +0000 (21:20 -0400)
.bash_profile

index 0a8665f187f370db3464276f4b6c6f9ab5341c64..4ad5a34a197c1f1da3d04fceac0b7343b310a629 100644 (file)
@@ -1,5 +1,9 @@
 if type -P keychain >/dev/null ; then
-       keychain -q $(find ~/.ssh/ -type f '(' -name 'id_*' -a '!' -name '*.pub' ')')
+       (
+       set -- $(find ~/.ssh/ -maxdepth 1 -type f '(' -name 'id_*' -a '!' -name '*.pub' ')')
+       chmod go-rwx "$@"
+       keychain -q "$@"
+       )
 fi
 [[ -f ~/.bashrc ]] && . ~/.bashrc
 stty -tostop