summaryrefslogtreecommitdiffstats
path: root/test/units/TEST-07-PID1.exec-context.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:19:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:19:48 +0000
commit68ea0ad933488166b8f6a9f8f2ea0287436cea25 (patch)
tree6ef163ae03d2463b703658a35f46a5807e32c36d /test/units/TEST-07-PID1.exec-context.sh
parentAdding upstream version 256.2. (diff)
downloadsystemd-68ea0ad933488166b8f6a9f8f2ea0287436cea25.tar.xz
systemd-68ea0ad933488166b8f6a9f8f2ea0287436cea25.zip
Adding upstream version 256.4.upstream/256.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/units/TEST-07-PID1.exec-context.sh')
-rwxr-xr-xtest/units/TEST-07-PID1.exec-context.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/units/TEST-07-PID1.exec-context.sh b/test/units/TEST-07-PID1.exec-context.sh
index a3379ef..cf39af0 100755
--- a/test/units/TEST-07-PID1.exec-context.sh
+++ b/test/units/TEST-07-PID1.exec-context.sh
@@ -186,27 +186,27 @@ if ! systemd-detect-virt -cq; then
)
# We should fail with EPERM when trying to bind to a socket not on the allow list
- # (nc exits with 2 in that case)
+ # (ncat exits with 2 in that case)
systemd-run --wait -p SuccessExitStatus="1 2" --pipe "${ARGUMENTS[@]}" \
- bash -xec 'timeout 1s nc -l 127.0.0.1 9999; exit 42'
+ bash -xec 'timeout 1s ncat -l 127.0.0.1 9999; exit 42'
systemd-run --wait -p SuccessExitStatus="1 2" --pipe "${ARGUMENTS[@]}" \
- bash -xec 'timeout 1s nc -l ::1 9999; exit 42'
+ bash -xec 'timeout 1s ncat -l ::1 9999; exit 42'
systemd-run --wait -p SuccessExitStatus="1 2" --pipe "${ARGUMENTS[@]}" \
- bash -xec 'timeout 1s nc -6 -u -l ::1 9999; exit 42'
+ bash -xec 'timeout 1s ncat -6 -u -l ::1 9999; exit 42'
systemd-run --wait -p SuccessExitStatus="1 2" --pipe "${ARGUMENTS[@]}" \
- bash -xec 'timeout 1s nc -4 -l 127.0.0.1 6666; exit 42'
+ bash -xec 'timeout 1s ncat -4 -l 127.0.0.1 6666; exit 42'
systemd-run --wait -p SuccessExitStatus="1 2" --pipe -p SocketBindDeny=any \
- bash -xec 'timeout 1s nc -l 127.0.0.1 9999; exit 42'
+ bash -xec 'timeout 1s ncat -l 127.0.0.1 9999; exit 42'
# Consequently, we should succeed when binding to a socket on the allow list
# and keep listening on it until we're killed by `timeout` (EC 124)
systemd-run --wait --pipe -p SuccessExitStatus=124 "${ARGUMENTS[@]}" \
- bash -xec 'timeout 1s nc -4 -l 127.0.0.1 1234; exit 1'
+ bash -xec 'timeout 1s ncat -4 -l 127.0.0.1 1234; exit 1'
systemd-run --wait --pipe -p SuccessExitStatus=124 "${ARGUMENTS[@]}" \
- bash -xec 'timeout 1s nc -4 -u -l 127.0.0.1 5678; exit 1'
+ bash -xec 'timeout 1s ncat -4 -u -l 127.0.0.1 5678; exit 1'
systemd-run --wait --pipe -p SuccessExitStatus=124 "${ARGUMENTS[@]}" \
- bash -xec 'timeout 1s nc -6 -l ::1 1234; exit 1'
+ bash -xec 'timeout 1s ncat -6 -l ::1 1234; exit 1'
systemd-run --wait --pipe -p SuccessExitStatus=124 "${ARGUMENTS[@]}" \
- bash -xec 'timeout 1s nc -6 -l ::1 6666; exit 1'
+ bash -xec 'timeout 1s ncat -6 -l ::1 6666; exit 1'
fi
losetup -d "$LODEV"