Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rules: make /dev/kvm world-read-writeable by default #5597

Merged
merged 1 commit into from
Mar 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3820,7 +3820,6 @@ dist_network_DATA = \
network/80-container-vz.network

dist_udevrules_DATA += \
rules/50-udev-default.rules \
rules/60-block.rules \
rules/60-drm.rules \
rules/60-evdev.rules \
Expand All @@ -3838,6 +3837,7 @@ dist_udevrules_DATA += \
rules/80-net-setup-link.rules

nodist_udevrules_DATA += \
rules/50-udev-default.rules \
rules/99-systemd.rules

udevconfdir = $(sysconfdir)/udev
Expand All @@ -3848,6 +3848,7 @@ pkgconfigdata_DATA += \
src/udev/udev.pc

EXTRA_DIST += \
rules/50-udev-default.rules.in \
rules/99-systemd.rules.in \
src/udev/udev.pc.in

Expand Down Expand Up @@ -6296,6 +6297,7 @@ substitutions = \
'|KILL_USER_PROCESSES=$(KILL_USER_PROCESSES)|' \
'|systemuidmax=$(SYSTEM_UID_MAX)|' \
'|systemgidmax=$(SYSTEM_GID_MAX)|' \
'|DEV_KVM_MODE=$(DEV_KVM_MODE)|' \
'|TTY_GID=$(TTY_GID)|' \
'|systemsleepdir=$(systemsleepdir)|' \
'|systemshutdowndir=$(systemshutdowndir)|' \
Expand Down
11 changes: 11 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,16 @@ AC_ARG_WITH(system-gid-max,
AC_DEFINE_UNQUOTED(SYSTEM_GID_MAX, [$SYSTEM_GID_MAX], [Maximum System GID])
AC_SUBST(SYSTEM_GID_MAX)

# ------------------------------------------------------------------------------

AC_ARG_WITH(dev-kvm-mode,
AS_HELP_STRING([--with-dev-kvm-mode=MODE],
[/dev/kvm access mode, defaults to "0660"]),
[DEV_KVM_MODE="$withval"],
[DEV_KVM_MODE="0660"])

AC_SUBST(DEV_KVM_MODE, [$DEV_KVM_MODE], [/dev/kvm access mode])

# ------------------------------------------------------------------------------
have_localed=no
AC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
Expand Down Expand Up @@ -1767,6 +1777,7 @@ AC_MSG_RESULT([
TTY GID: ${TTY_GID}
maximum system UID: ${SYSTEM_UID_MAX}
maximum system GID: ${SYSTEM_GID_MAX}
/dev/kvm access mode: ${DEV_KVM_MODE}
certificate root: ${CERTIFICATEROOT}
support URL: ${SUPPORT_URL}
nobody user name: ${NOBODY_USER_NAME}
Expand Down
1 change: 1 addition & 0 deletions rules/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/50-udev-default.rules
/99-systemd.rules
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ KERNEL=="tun", MODE="0666", OPTIONS+="static_node=net/tun"

KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse"

KERNEL=="kvm", GROUP="kvm", MODE="@DEV_KVM_MODE@"

SUBSYSTEM=="ptp", ATTR{clock_name}=="KVM virtual PTP", SYMLINK += "ptp_kvm"

LABEL="default_end"
1 change: 1 addition & 0 deletions sysusers.d/basic.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ g dialout - - -
g disk - - -
g input - - -
g lp - - -
g kvm - - -
g tape - - -
g video - - -

Expand Down