eudev: Set /dev/kvm mode to 0660 and tag it "uaccess"

See the parent commit for rationale.
This commit is contained in:
Xi Ruoyao 2023-04-10 16:17:17 +08:00
parent dfde6640eb
commit a4b0c6d60a
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3

View File

@ -40,8 +40,6 @@
<sect2 role="installation"> <sect2 role="installation">
<title>Installation of Eudev</title> <title>Installation of Eudev</title>
<para>First fix the location of udev rules in the .pc file:</para> <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> <screen><userinput remap="pre">sed -i '/udevdir/a udev_dir=${udevdir}' src/udev/udev.pc.in</userinput></screen>
@ -88,6 +86,20 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<secondary>configuring</secondary> <secondary>configuring</secondary>
</indexterm> </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 &lt;&lt; "EOF"
<literal>KERNEL=="kvm", GROUP="kvm", MODE="0660", TAG+="uaccess"</literal>
EOF</userinput></screen>
<indexterm zone="conf-eudev"> <indexterm zone="conf-eudev">
<primary sortas="e-/etc/udev/hwdb.bin">/etc/udev/hwdb.bin</primary> <primary sortas="e-/etc/udev/hwdb.bin">/etc/udev/hwdb.bin</primary>
</indexterm> </indexterm>