[lxc-devel] [lxc/master] tests/no-new-privs: Don't mess with /etc/lxc
stgraber on Github
lxc-bot at linuxcontainers.org
Sun Apr 12 03:05:27 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200411/fa3765b6/attachment.bin>
-------------- next part --------------
From ecf1f1207b4624e3d2b9ed13fd39123799a74fee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Sat, 11 Apr 2020 23:05:04 -0400
Subject: [PATCH] tests/no-new-privs: Don't mess with /etc/lxc
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
src/tests/lxc-test-no-new-privs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/tests/lxc-test-no-new-privs b/src/tests/lxc-test-no-new-privs
index 8642992dd3..cfcb43bd6c 100755
--- a/src/tests/lxc-test-no-new-privs
+++ b/src/tests/lxc-test-no-new-privs
@@ -36,11 +36,13 @@ cleanup() {
trap cleanup EXIT SIGHUP SIGINT SIGTERM
-mkdir -p /etc/lxc/
-cat > /etc/lxc/default.conf << EOF
+if [ ! -d /etc/lxc ]; then
+ mkdir -p /etc/lxc/
+ cat > /etc/lxc/default.conf << EOF
lxc.net.0.type = veth
lxc.net.0.link = lxcbr0
EOF
+fi
ARCH=i386
if type dpkg >/dev/null 2>&1; then
More information about the lxc-devel
mailing list