diff options
author | Colin Watson <cjwatson@debian.org> | 2019-06-05 06:41:44 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2019-06-05 06:41:44 +0100 |
commit | 102062f825fb26a74295a1c089c00c4c4c76b68a (patch) | |
tree | 3db66bc8c8483cce66516dff36f6ef56065143d9 /regress/principals-command.sh | |
parent | 3d246f10429fc9a37b98eabef94fe8dc7c61002b (diff) | |
parent | fd0fa130ecf06d7d092932adcd5d77f1549bfc8d (diff) |
Import openssh_8.0p1.orig.tar.gz
Diffstat (limited to 'regress/principals-command.sh')
-rw-r--r-- | regress/principals-command.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/regress/principals-command.sh b/regress/principals-command.sh index bcc68e80b..197c00021 100644 --- a/regress/principals-command.sh +++ b/regress/principals-command.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: principals-command.sh,v 1.4 2017/04/30 23:34:55 djm Exp $ | 1 | # $OpenBSD: principals-command.sh,v 1.6 2018/11/22 08:48:32 dtucker Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="authorized principals command" | 4 | tid="authorized principals command" |
@@ -30,7 +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. |
33 | PRINCIPALS_COMMAND="/var/run/principals_command_${LOGNAME}" | 33 | PRINCIPALS_COMMAND="/var/run/principals_command_${LOGNAME}.$$" |
34 | trap "$SUDO rm -f ${PRINCIPALS_COMMAND}" 0 | ||
34 | cat << _EOF | $SUDO sh -c "cat > '$PRINCIPALS_COMMAND'" | 35 | cat << _EOF | $SUDO sh -c "cat > '$PRINCIPALS_COMMAND'" |
35 | #!/bin/sh | 36 | #!/bin/sh |
36 | test "x\$1" != "x${LOGNAME}" && exit 1 | 37 | test "x\$1" != "x${LOGNAME}" && exit 1 |
@@ -57,7 +58,7 @@ fi | |||
57 | 58 | ||
58 | if [ -x $PRINCIPALS_COMMAND ]; then | 59 | if [ -x $PRINCIPALS_COMMAND ]; then |
59 | # Test explicitly-specified principals | 60 | # Test explicitly-specified principals |
60 | for privsep in yes no ; do | 61 | for privsep in yes sandbox ; do |
61 | _prefix="privsep $privsep" | 62 | _prefix="privsep $privsep" |
62 | 63 | ||
63 | # Setup for AuthorizedPrincipalsCommand | 64 | # Setup for AuthorizedPrincipalsCommand |