]> code.ossystems Code Review - openembedded-core.git/commitdiff
xserver-nodm-init: Add xuser to input group
authorDarren Hart <dvhart@linux.intel.com>
Wed, 3 Apr 2013 19:49:41 +0000 (12:49 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 4 Apr 2013 13:00:32 +0000 (14:00 +0100)
Fixes [YOCTO 4164](3/3)

Input devices come and go, so a single chmod in this init script is not
adequate to ensure rootless X servers can use input devices.

The o+rw method also introduces a security hole.

The newly added input group and input udev rule address this in a secure
way. Ensure the xuser is added to the input group.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Saul Wold <sgw@linux.intel.com>
Cc: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-graphics/x11-common/xserver-nodm-init.bb
meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm

index eab76c597b54c1a7b217ee69e8ef6595eb8af634..d2797a99d1a2ad295647ff91e7d19fbdfab24290 100644 (file)
@@ -2,7 +2,7 @@ DESCRIPTION = "Simple Xserver Init Script (no dm)"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 SECTION = "x11"
-PR = "r30"
+PR = "r31"
 RDEPENDS_${PN} = "sudo"
 
 SRC_URI = "file://xserver-nodm \
@@ -34,6 +34,6 @@ INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
 # USERADD_PARAM is in sync with the one in connman.inc
 USERADD_PACKAGES = "${PN}"
 USERADD_PARAM_${PN} = "--create-home \
-                       --groups video,tty,audio \
+                       --groups video,tty,audio,input \
                        --user-group xuser"
 
index e790fb0921684077f157656892d83864383848c9..f6692a814bcf4183ef94ab1ac1d7c4a1801fcac2 100755 (executable)
@@ -33,7 +33,6 @@ case "$1" in
            # setting for rootless X
            chmod o+w /var/log
            chmod g+r /dev/tty[0-3]
-           chmod o+rw /dev/input/*
            # hidraw device is probably needed
            if [ -e /dev/hidraw0 ]; then
                chmod o+rw /dev/hidraw*