Files
poky/meta/recipes-extended/shadow/shadow-securetty_4.6.bb
Chen Qi ffb63803ea shadow: upgrade 4.2.1 -> 4.6
The following patches are removed because problems have been fixed in this version.
  0001-shadow-CVE-2017-12424
  fix-installation-failure-with-subids-disabled.patch
  usermod-fix-compilation-failure-with-subids-disabled.patch
  CVE-2017-2616.patch
  check_size_of_uid_t_and_gid_t_using_AC_CHECK_SIZEOF.patch
  0001-Do-not-read-login.defs-before-doing-chroot.patch

The following patches are rebased.
  0001-Disable-use-of-syslog-for-sysroot.patch
  0001-useradd-copy-extended-attributes-of-home.patch
  0001-useradd.c-create-parent-directories-when-necessary.patch
  allow-for-setting-password-in-clear-text.patch

(From OE-Core rev: 79dd22729d5b8a2f2cf4294ff6b261c9d6ecd977)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-30 12:44:35 +01:00

39 lines
1.3 KiB
BlitzBasic

SUMMARY = "Provider of the machine specific securetty file"
SECTION = "base utils"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
INHIBIT_DEFAULT_DEPS = "1"
PR = "r3"
SRC_URI = "file://securetty"
S = "${WORKDIR}"
# Since SERIAL_CONSOLES is likely to be set from the machine configuration
PACKAGE_ARCH = "${MACHINE_ARCH}"
do_install () {
# Ensure we add a suitable securetty file to the package that has
# most common embedded TTYs defined.
install -d ${D}${sysconfdir}
install -m 0400 ${WORKDIR}/securetty ${D}${sysconfdir}/securetty
if [ ! -z "${SERIAL_CONSOLES}" ]; then
# Our SERIAL_CONSOLES contains a baud rate and sometimes extra
# options as well. The following pearl :) takes that and converts
# it into newline-separated tty's and appends them into
# securetty. So if a machine has a weird looking console device
# node (e.g. ttyAMA0) that securetty does not know, it will get
# appended to securetty and root logins will be allowed on that
# console.
tmp="${SERIAL_CONSOLES}"
for entry in $tmp ; do
ttydev=`echo "$entry" | sed -e 's/^[0-9]*\;//' -e 's/\;.*//'`
if ! grep -q $ttydev ${D}${sysconfdir}/securetty; then
echo $ttydev >> ${D}${sysconfdir}/securetty
fi
done
fi
}