diff options
Diffstat (limited to 'poky/meta/recipes-graphics/x11-common/xserver-nodm-init')
-rw-r--r-- | poky/meta/recipes-graphics/x11-common/xserver-nodm-init/capability.conf | 2 | ||||
-rwxr-xr-x | poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/capability.conf b/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/capability.conf new file mode 100644 index 000000000..7ab746081 --- /dev/null +++ b/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/capability.conf @@ -0,0 +1,2 @@ +cap_sys_admin @USER@ +none * diff --git a/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm b/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm index 6c548551b..116bb278b 100755 --- a/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm +++ b/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm @@ -38,6 +38,14 @@ case "$1" in if [ -e /dev/hidraw0 ]; then chmod o+rw /dev/hidraw* fi + # Make sure that the Xorg has the cap_sys_admin capability which is + # needed for setting the drm master + if ! grep -q "^auth.*pam_cap\.so" /etc/pam.d/su; then + echo "auth optional pam_cap.so" >>/etc/pam.d/su + fi + if ! /usr/sbin/getcap $XSERVER | grep -q cap_sys_admin; then + /usr/sbin/setcap cap_sys_admin+eip $XSERVER + fi fi # Using su rather than sudo as latest 1.8.1 cause failure [YOCTO #1211] |