5 # A wrapper script around sshd to invoke when debugging to debug the
6 # work-in-progress versions of sshd-auth and sshd-session, instead
7 # of debugging the installed ones that probably don't have the change
10 # Placed in the Public Domain.
12 unset DIR SSHD SSHD_AUTH SSHD_SESSION
20 /*) DIR
="`dirname $0`" ;;
21 .
/sshd-debug.sh
) DIR
="`pwd`" ;;
22 *) echo "Need full path or working directory."; exit 1 ;;
25 for i
in sshd
/obj
/sshd
sshd
/sshd sshd
; do
26 if [ -f "${DIR}/$i" ] && [ -x "${DIR}/$i" ]; then
30 [ -z "${SSHD}" ] && fatal
"Could not find sshd"
32 for i
in sshd-auth
/obj
/sshd-auth sshd-auth
/sshd-auth sshd-auth
; do
33 if [ -f "${DIR}/$i" ] && [ -x "${DIR}/$i" ]; then
37 [ -z "${SSHD_AUTH}" ] && fatal
"Could not find sshd-auth"
39 for i
in sshd-session
/obj
/sshd-session sshd-session
/sshd-session sshd-session
; do
40 if [ -f "${DIR}/$i" ] && [ -x "${DIR}/$i" ]; then
41 SSHD_SESSION
="${DIR}/$i"
44 [ -z "${SSHD_SESSION}" ] && fatal
"Could not find sshd-session"
46 echo >&2 Debugging
${SSHD} auth ${SSHD_AUTH} session ${SSHD_SESSION}
48 # Append SshdSessionPath and SshdAuthPath pointing to the build directory.
49 # If you explicitly specify these in the command line, the first-match
50 # keyword semantics will override these.
52 -oSshdAuthPath="${SSHD_AUTH}" -oSshdSessionPath="${SSHD_SESSION}"