From a4b0c6d60a7d6c112fbc6a43e868ac65b34b16bf Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 10 Apr 2023 16:17:17 +0800 Subject: eudev: Set /dev/kvm mode to 0660 and tag it "uaccess" See the parent commit for rationale. --- chapter08/eudev.xml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'chapter08') diff --git a/chapter08/eudev.xml b/chapter08/eudev.xml index 0cce469e1..f4c5ac5d2 100644 --- a/chapter08/eudev.xml +++ b/chapter08/eudev.xml @@ -40,8 +40,6 @@ Installation of Eudev - - First fix the location of udev rules in the .pc file: sed -i '/udevdir/a udev_dir=${udevdir}' src/udev/udev.pc.in @@ -88,6 +86,20 @@ make -f &udev-lfs-version;/Makefile.lfs install configuring + + /etc/udev/rules.d/65-kvm.rules + + + + The default udev rule installed by Eudev would allow all users to + access /dev/kvm. The editors + consider it dangerous. Create a configuration file to override it: + + +cat > /etc/udev/rules.d/65-kvm.rules << "EOF" +KERNEL=="kvm", GROUP="kvm", MODE="0660", TAG+="uaccess" +EOF + /etc/udev/hwdb.bin -- cgit v1.2.3-54-g00ecf