From 6652ce15a45c5860f130e3d24567b176dcd3c7fa Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 27 Apr 2021 00:36:23 +0200 Subject: [PATCH] Meta: Don't run qemu as root This currently only supports Linux but I don't think anyone else ran this yet because they'd have run into the E1000 bug I fixed in #6669 --- Meta/run.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Meta/run.sh b/Meta/run.sh index 12779b20c6372e..d7f606c8d31ded 100755 --- a/Meta/run.sh +++ b/Meta/run.sh @@ -105,7 +105,8 @@ elif [ "$SERENITY_RUN" = "qn" ]; then -append "${SERENITY_KERNEL_CMDLINE}" elif [ "$SERENITY_RUN" = "qtap" ]; then # Meta/run.sh qtap: qemu with tap - sudo "$SERENITY_QEMU_BIN" \ + sudo ip tuntap add dev tap0 mode tap user "$(id -u)" + "$SERENITY_QEMU_BIN" \ $SERENITY_COMMON_QEMU_ARGS \ $SERENITY_VIRT_TECH_ARG \ $SERENITY_PACKET_LOGGING_ARG \ @@ -113,6 +114,7 @@ elif [ "$SERENITY_RUN" = "qtap" ]; then -device e1000,netdev=br0 \ -kernel Kernel/Kernel \ -append "${SERENITY_KERNEL_CMDLINE}" + sudo ip tuntap del dev tap0 mode tap elif [ "$SERENITY_RUN" = "qgrub" ]; then # Meta/run.sh qgrub: qemu with grub "$SERENITY_QEMU_BIN" \