]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev-rules: Permission changes for /dev/dri/renderD*
authorTom Stellard <tstellar@redhat.com>
Tue, 31 Oct 2017 15:46:24 +0000 (08:46 -0700)
committerTom Stellard <tstellar@redhat.com>
Wed, 8 Nov 2017 16:21:31 +0000 (08:21 -0800)
- Remove the uaccess tag from /dev/dri/renderD*.
- Change the owning group from video to render.
- Change default mode to 0666.
- Add an option to allow users to set the access mode for these devices at
compile time.

meson.build
meson_options.txt
rules/50-udev-default.rules.in
src/login/70-uaccess.rules
sysusers.d/basic.conf.in

index 34eed35190350203b5c421d14651aea49c980c39..e935a093743d703ae65df1d609dbf17ed3e0e7cf 100644 (file)
@@ -614,6 +614,7 @@ if get_option('wheel-group')
 endif
 
 substs.set('DEV_KVM_MODE', get_option('dev-kvm-mode'))
+substs.set('GROUP_RENDER_MODE', get_option('group-render-mode'))
 
 kill_user_processes = get_option('default-kill-user-processes')
 conf.set10('KILL_USER_PROCESSES', kill_user_processes)
@@ -2452,6 +2453,7 @@ status = [
         'maximum system UID:                @0@'.format(system_uid_max),
         'maximum system GID:                @0@'.format(system_gid_max),
         '/dev/kvm access mode:              @0@'.format(get_option('dev-kvm-mode')),
+        'render group access mode:          @0@'.format(get_option('group-render-mode')),
         'certificate root:                  @0@'.format(get_option('certificate-root')),
         'support URL:                       @0@'.format(support_url),
         'nobody user name:                  @0@'.format(get_option('nobody-user')),
index 50f24df1b3574e0e1edf69f03ec574c06d911307..037c298887c683fc171ed33dede0611ce392fc4a 100644 (file)
@@ -146,6 +146,8 @@ option('nobody-group', type : 'string',
        value : 'nobody')
 option('dev-kvm-mode', type : 'string', value : '0666',
        description : '/dev/kvm access mode')
+option('group-render-mode', type : 'string', value : '0666',
+       description : 'Access mode for devices owned by render group (e.g. /dev/dri/renderD*, /dev/kfd).')
 option('default-kill-user-processes', type : 'boolean',
        description : 'the default value for KillUserProcesses= setting')
 option('gshadow', type : 'boolean',
index d3d1c9a20672afbad1f4d51e971ff94efb5aae7c..b17d3cf87e686da07d848afd429a22d94233cbca 100644 (file)
@@ -31,11 +31,13 @@ SUBSYSTEM=="input", KERNEL=="js[0-9]*", MODE="0664"
 
 SUBSYSTEM=="video4linux", GROUP="video"
 SUBSYSTEM=="graphics", GROUP="video"
-SUBSYSTEM=="drm", GROUP="video"
+SUBSYSTEM=="drm", KERNEL!="renderD*", GROUP="video"
 SUBSYSTEM=="dvb", GROUP="video"
 SUBSYSTEM=="media", GROUP="video"
 SUBSYSTEM=="cec", GROUP="video"
 
+SUBSYSTEM=="drm", KERNEL=="renderD*", GROUP="render", MODE="@GROUP_RENDER_MODE@"
+
 SUBSYSTEM=="sound", GROUP="audio", \
   OPTIONS+="static_node=snd/seq", OPTIONS+="static_node=snd/timer"
 
index 9e9dbae0e061ae78fb288e5b6bba4df25fb24471..e946bf2380be4c2bbd30658e6ae5a5b87e14a6fa 100644 (file)
@@ -43,7 +43,7 @@ SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", TAG+="uaccess"
 SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x014001*", TAG+="uaccess"
 
 # DRI video devices
-SUBSYSTEM=="drm", KERNEL=="card*|renderD*", TAG+="uaccess"
+SUBSYSTEM=="drm", KERNEL=="card*", TAG+="uaccess"
 
 # smart-card readers
 ENV{ID_SMARTCARD_READER}=="?*", TAG+="uaccess"
index 7d6021e855a6e26f15e0b179cb9979c67e0ac059..6c23f4216dd534022f16bbe508256aaf5e11af28 100644 (file)
@@ -32,6 +32,7 @@ g lp      -     -            -
 g kvm     -     -            -
 g tape    -     -            -
 g video   -     -            -
+g render  -     -            -
 
 # Default group for normal users
 g users   -     -            -