diff options
author | bluhm@openbsd.org <bluhm@openbsd.org> | 2016-09-26 21:34:38 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2016-10-01 06:44:00 +1000 |
commit | ce44c970f913d2a047903dba8670554ac42fc479 (patch) | |
tree | 27d0a9067e7d9669e5422ba6ef2f2cc9b59fbf48 /regress/principals-command.sh | |
parent | 8d0578478586e283e751ca51e7b0690631da139a (diff) |
upstream commit
Allow to run ssh regression tests as root. If the user
is already root, the test should not expect that SUDO is set. If ssh needs
another user, use sudo or doas to switch from root if necessary. OK dtucker@
Upstream-Regress-ID: b464e55185ac4303529e3e6927db41683aaeace2
Diffstat (limited to 'regress/principals-command.sh')
-rw-r--r-- | regress/principals-command.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/regress/principals-command.sh b/regress/principals-command.sh index 19d7d6c96..680bd957f 100644 --- a/regress/principals-command.sh +++ b/regress/principals-command.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: principals-command.sh,v 1.2 2016/09/21 01:35:12 djm Exp $ | 1 | # $OpenBSD: principals-command.sh,v 1.3 2016/09/26 21:34:38 bluhm 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" |
@@ -6,7 +6,7 @@ tid="authorized principals command" | |||
6 | rm -f $OBJ/user_ca_key* $OBJ/cert_user_key* | 6 | rm -f $OBJ/user_ca_key* $OBJ/cert_user_key* |
7 | cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak | 7 | cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak |
8 | 8 | ||
9 | if test -z "$SUDO" ; then | 9 | if [ -z "$SUDO" -a ! -w /var/run ]; then |
10 | echo "skipped (SUDO not set)" | 10 | echo "skipped (SUDO not set)" |
11 | echo "need SUDO to create file in /var/run, test won't work without" | 11 | echo "need SUDO to create file in /var/run, test won't work without" |
12 | exit 0 | 12 | exit 0 |