mirror of
git://git.yoctoproject.org/poky
synced 2026-09-30 00:41:05 +00:00
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. (From OE-Core rev: 150b7ac8e1c0f029b90f63424867ee5347821cf7) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
40 lines
1.1 KiB
BlitzBasic
40 lines
1.1 KiB
BlitzBasic
DESCRIPTION = "Simple Xserver Init Script (no dm)"
|
|
LICENSE = "GPLv2"
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
|
|
SECTION = "x11"
|
|
PR = "r31"
|
|
RDEPENDS_${PN} = "sudo"
|
|
|
|
SRC_URI = "file://xserver-nodm \
|
|
file://Xusername \
|
|
file://gplv2-license.patch"
|
|
|
|
S = "${WORKDIR}"
|
|
|
|
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
|
|
|
do_install() {
|
|
install -d ${D}${sysconfdir}
|
|
install -d ${D}${sysconfdir}/init.d
|
|
install xserver-nodm ${D}${sysconfdir}/init.d
|
|
if [ "${ROOTLESS_X}" = "1" ] ; then
|
|
install -d ${D}${sysconfdir}/X11
|
|
install Xusername ${D}${sysconfdir}/X11
|
|
fi
|
|
}
|
|
|
|
inherit update-rc.d useradd
|
|
|
|
INITSCRIPT_NAME = "xserver-nodm"
|
|
INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
|
|
|
|
# Use fixed Xusername of xuser for now, this will need to be
|
|
# fixed if the Xusername changes from xuser
|
|
# IMPORTANT: because xuser is shared with connman, please make sure the
|
|
# USERADD_PARAM is in sync with the one in connman.inc
|
|
USERADD_PACKAGES = "${PN}"
|
|
USERADD_PARAM_${PN} = "--create-home \
|
|
--groups video,tty,audio,input \
|
|
--user-group xuser"
|
|
|