diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-26 07:59:46 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-26 07:59:46 +0000 |
commit | 61d1e9dee4dc3dbe8a2c0096f77232ce10d06712 (patch) | |
tree | 99b9b91143381c5ebd3383b100fd2492dd6c0460 /debian/tests | |
parent | Adding debian version 1:9.8p1-1. (diff) | |
download | openssh-61d1e9dee4dc3dbe8a2c0096f77232ce10d06712.tar.xz openssh-61d1e9dee4dc3dbe8a2c0096f77232ce10d06712.zip |
Adding debian version 1:9.8p1-2.debian/1%9.8p1-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests')
-rw-r--r-- | debian/tests/control | 10 | ||||
-rwxr-xr-x | debian/tests/socket-activation | 27 |
2 files changed, 37 insertions, 0 deletions
diff --git a/debian/tests/control b/debian/tests/control index f7c0afb..0f5a493 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -25,3 +25,13 @@ Depends: krb5-admin-server, krb5-kdc, openssh-server, + +Tests: + socket-activation, +Restrictions: + allow-stderr, + isolation-container, + needs-root, +Depends: + openssh-server, + sudo, diff --git a/debian/tests/socket-activation b/debian/tests/socket-activation new file mode 100755 index 0000000..20a0d0b --- /dev/null +++ b/debian/tests/socket-activation @@ -0,0 +1,27 @@ +#! /bin/sh +set -e + +testuser="testuser$$" +adduser --quiet --disabled-password --gecos "" "$testuser" +sudo -u "$testuser" mkdir -m700 "/home/$testuser/.ssh" +sudo -u "$testuser" \ + ssh-keygen -t ed25519 -N '' -f "/home/$testuser/.ssh/id_ed25519" +sudo -u "$testuser" \ + cp "/home/$testuser/.ssh/id_ed25519.pub" \ + "/home/$testuser/.ssh/authorized_keys" + +cleanup () { + if [ $? -ne 0 ]; then + echo "## Something failed" + echo + echo "## ssh server log" + journalctl -b -u ssh.service --lines 100 + fi +} + +trap cleanup EXIT + +systemctl disable --now ssh.service +systemctl enable --now ssh.socket +sudo -u "$testuser" \ + ssh -oStrictHostKeyChecking=accept-new "$testuser@localhost" date |