X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fshare%2Fmh%2Fpublish_key;h=48e4cbb16169222895fb0902aa171a8647c17879;hb=1080589181dd117ef5ab3549e67d206f8a64e834;hp=37b8a72628ad741bff5e50e380495b6aadb47be6;hpb=62374dd1c16a2719202955ad3fe878be5cc14dba;p=monkeysphere.git diff --git a/src/share/mh/publish_key b/src/share/mh/publish_key index 37b8a72..48e4cbb 100644 --- a/src/share/mh/publish_key +++ b/src/share/mh/publish_key @@ -18,8 +18,9 @@ publish_key() { local GNUPGHOME if [ "$PROMPT" = "true" ] ; then - read -p "Really publish host key to $KEYSERVER? (y/N) " OK; OK=${OK:=N} - if [ ${OK/y/Y} != 'Y' ] ; then + printf "Really publish host key to $KEYSERVER? (Y/n) " >&2 + read OK; OK=${OK:=Y} + if [ "${OK/y/Y}" != 'Y' ] ; then failure "key not published." fi else @@ -28,6 +29,8 @@ fi # create a temporary gnupg directory from which to publish the key export GNUPGHOME=$(msmktempdir) +chmod 0700 "$GNUPGHOME" +chown "$MONKEYSPHERE_USER":"$MONKEYSPHERE_GROUP" "$GNUPGHOME" # trap to remove tmp dir if break trap "rm -rf $GNUPGHOME" EXIT