diff options
author | Xi Ruoyao <xry111@xry111.site> | 2023-04-10 16:17:17 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2023-04-10 16:17:17 +0800 |
commit | a4b0c6d60a7d6c112fbc6a43e868ac65b34b16bf (patch) | |
tree | 23a23219ce7379989bdeb7e0d4b0dc6e00e7f8ea /chapter08 | |
parent | dfde6640ebad505e7af7dc204a0e2c16dfddfb1e (diff) |
eudev: Set /dev/kvm mode to 0660 and tag it "uaccess"
See the parent commit for rationale.
Diffstat (limited to 'chapter08')
-rw-r--r-- | chapter08/eudev.xml | 16 |
1 files changed, 14 insertions, 2 deletions
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 @@ <sect2 role="installation"> <title>Installation of Eudev</title> - - <para>First fix the location of udev rules in the .pc file:</para> <screen><userinput remap="pre">sed -i '/udevdir/a udev_dir=${udevdir}' src/udev/udev.pc.in</userinput></screen> @@ -89,6 +87,20 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen> </indexterm> <indexterm zone="conf-eudev"> + <primary sortas="e-/etc/udev/rules.d/65-kvm.rules">/etc/udev/rules.d/65-kvm.rules</primary> + </indexterm> + + <para> + The default udev rule installed by Eudev would allow all users to + access <filename class='devicefile'>/dev/kvm</filename>. The editors + consider it dangerous. Create a configuration file to override it: + </para> + +<screen><userinput remap="configure">cat > /etc/udev/rules.d/65-kvm.rules << "EOF" +<literal>KERNEL=="kvm", GROUP="kvm", MODE="0660", TAG+="uaccess"</literal> +EOF</userinput></screen> + + <indexterm zone="conf-eudev"> <primary sortas="e-/etc/udev/hwdb.bin">/etc/udev/hwdb.bin</primary> </indexterm> |