Merge pull request #29529 from yuwata/core-namespace-check-priv

core/namespace: check if we have enough privilege
This commit is contained in:
Luca Boccassi
2023-10-26 14:27:56 +01:00
committed by GitHub
3 changed files with 91 additions and 66 deletions
+3
View File
@@ -4,6 +4,9 @@ set -e
TEST_DESCRIPTION="Tests for core PID1 functionality"
# for testing PrivateNetwork=yes
NSPAWN_ARGUMENTS="--capability=CAP_NET_ADMIN"
# shellcheck source=test/test-functions
. "${TEST_BASE_DIR:?}/test-functions"
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eux
set -o pipefail
# For issue https://github.com/systemd/systemd/issues/29526
systemd-run -p PrivateNetwork=yes --wait /bin/true