summaryrefslogtreecommitdiff
path: root/regress/principals-command.sh
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2016-10-13 18:53:43 +1100
committerDamien Miller <djm@mindrot.org>2016-10-13 18:55:25 +1100
commitca04de83f210959ad2ed870a30ba1732c3ae00e3 (patch)
treeb939bef075ffd4ef4342b8c3de78e653c1cb3960 /regress/principals-command.sh
parent1723ec92eb485ce06b4cbf49712d21975d873909 (diff)
unbreak principals-command test
Undo inconsistetly updated variable name.
Diffstat (limited to 'regress/principals-command.sh')
-rw-r--r--regress/principals-command.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/regress/principals-command.sh b/regress/principals-command.sh
index 680bd957f..9b38eb105 100644
--- a/regress/principals-command.sh
+++ b/regress/principals-command.sh
@@ -30,8 +30,8 @@ CA_FP=`${SSHKEYGEN} -lf $OBJ/user_ca_key.pub | awk '{ print $2 }'`
30 30
31# Establish a AuthorizedPrincipalsCommand in /var/run where it will have 31# Establish a AuthorizedPrincipalsCommand in /var/run where it will have
32# acceptable directory permissions. 32# acceptable directory permissions.
33PRINCIPALS_CMD="/var/run/principals_command_${LOGNAME}" 33PRINCIPALS_COMMAND="/var/run/principals_command_${LOGNAME}"
34cat << _EOF | $SUDO sh -c "cat > '$PRINCIPALS_CMD'" 34cat << _EOF | $SUDO sh -c "cat > '$PRINCIPALS_COMMAND'"
35#!/bin/sh 35#!/bin/sh
36test "x\$1" != "x${LOGNAME}" && exit 1 36test "x\$1" != "x${LOGNAME}" && exit 1
37test "x\$2" != "xssh-rsa-cert-v01@openssh.com" && exit 1 37test "x\$2" != "xssh-rsa-cert-v01@openssh.com" && exit 1
@@ -46,16 +46,16 @@ test -f "$OBJ/authorized_principals_${LOGNAME}" &&
46 exec cat "$OBJ/authorized_principals_${LOGNAME}" 46 exec cat "$OBJ/authorized_principals_${LOGNAME}"
47_EOF 47_EOF
48test $? -eq 0 || fatal "couldn't prepare principals command" 48test $? -eq 0 || fatal "couldn't prepare principals command"
49$SUDO chmod 0755 "$PRINCIPALS_CMD" 49$SUDO chmod 0755 "$PRINCIPALS_COMMAND"
50 50
51if ! $OBJ/check-perm -m keys-command $PRINCIPALS_CMD ; then 51if ! $OBJ/check-perm -m keys-command $PRINCIPALS_COMMAND ; then
52 echo "skipping: $PRINCIPALS_CMD is unsuitable as " \ 52 echo "skipping: $PRINCIPALS_COMMAND is unsuitable as " \
53 "AuthorizedPrincipalsCommand" 53 "AuthorizedPrincipalsCommand"
54 $SUDO rm -f $PRINCIPALS_CMD 54 $SUDO rm -f $PRINCIPALS_COMMAND
55 exit 0 55 exit 0
56fi 56fi
57 57
58if [ -x $PRINCIPALS_CMD ]; then 58if [ -x $PRINCIPALS_COMMAND ]; then
59 # Test explicitly-specified principals 59 # Test explicitly-specified principals
60 for privsep in yes no ; do 60 for privsep in yes no ; do
61 _prefix="privsep $privsep" 61 _prefix="privsep $privsep"