X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fmonkeysphere-ssh-proxycommand;h=62760929e1861112c3e17c1bf6ea1af9b1cdffc4;hb=7833a5e9da4c6e15eea7edfc38ae122360b37f1f;hp=0e66e104f560835876057f79bd7cb3d9be2ed913;hpb=5bb8d410b08bf36d1ff3f36257ac364080d80aa9;p=monkeysphere.git diff --git a/src/monkeysphere-ssh-proxycommand b/src/monkeysphere-ssh-proxycommand index 0e66e10..6276092 100755 --- a/src/monkeysphere-ssh-proxycommand +++ b/src/monkeysphere-ssh-proxycommand @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # monkeysphere-ssh-proxycommand: MonkeySphere ssh ProxyCommand hook # @@ -13,10 +13,6 @@ # established. Can be added to ~/.ssh/config as follows: # ProxyCommand monkeysphere-ssh-proxycommand %h %p -######################################################################## -SHARE=${MONKEYSPHERE_SHARE:-"/usr/share/monkeysphere"} -. "${SHARE}/common" || exit 1 - ######################################################################## usage() { @@ -38,8 +34,6 @@ fi HOST="$1" PORT="$2" -MS_HOME=${MS_HOME:-"${HOME}/.config/monkeysphere"} - if [ -z "$HOST" ] ; then echo "Host not specified." >&2 usage @@ -57,6 +51,12 @@ else fi URI="ssh://${HOSTP}" +# specify keyserver checking. the behavior of this proxy command is +# intentionally different than that of running monkeyesphere normally, +# and keyserver checking is intentionally done under certain +# circumstances. This can be overridden by setting the +# MONKEYSPHERE_CHECK_KEYSERVER environment variable. + # if the host is in the gpg keyring... if gpg --list-key ="${URI}" 2>&1 >/dev/null ; then # do not check the keyserver @@ -81,7 +81,7 @@ else CHECK_KEYSERVER="true" fi fi - +# set and export the variable for use by monkeysphere MONKEYSPHERE_CHECK_KEYSERVER=${MONKEYSPHERE_CHECK_KEYSERVER:="$CHECK_KEYSERVER"} export MONKEYSPHERE_CHECK_KEYSERVER