Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "New user to do specific job" |
| 2 | DESCRIPTION = "This recipe create a new user named ${PN}, who is used for specific jobs like building. The task can be auto started via mini X" |
| 3 | SECTION = "x11" |
| 4 | PR = "r6" |
| 5 | LICENSE = "MIT" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 6 | LIC_FILES_CHKSUM = "file://builder_session.sh;endline=5;md5=84796c3c41785d86100fdabcbdade00e" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 7 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 8 | SRC_URI = "file://builder_session.sh \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 9 | " |
| 10 | |
| 11 | S = "${WORKDIR}" |
| 12 | |
| 13 | RDEPENDS_${PN} = "mini-x-session" |
| 14 | |
| 15 | inherit useradd |
| 16 | |
| 17 | # builder user password is "builder" |
| 18 | BUILDER_PASSWORD ?= ".gLibiNXn0P12" |
| 19 | USERADD_PACKAGES = "${PN}" |
| 20 | USERADD_PARAM_${PN} = "--system --create-home \ |
| 21 | --groups video,tty,audio \ |
| 22 | --password ${BUILDER_PASSWORD} \ |
| 23 | --user-group builder" |
| 24 | |
| 25 | do_install () { |
| 26 | install -d -m 755 ${D}${sysconfdir}/mini_x/session.d |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 27 | install -p -m 755 builder_session.sh ${D}${sysconfdir}/mini_x/session.d/ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 28 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 29 | chown builder.builder ${D}${sysconfdir}/mini_x/session.d/builder_session.sh |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 30 | } |
| 31 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame^] | 32 | # -4178 is an unrelated 'builder' |
| 33 | CVE_CHECK_WHITELIST = "CVE-2008-4178" |