From: Andrei Gherzan Date: Wed, 24 Aug 2022 09:42:17 +0000 (+0200) Subject: shadow: Enable subid support X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~3146 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=364a6f408c9feb5b9472ddabbc352d8b432bfffd;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git shadow: Enable subid support shadow utils are used when creating users at image creation time. The useradd/usermod tools will only try to add a default configuration for subid files if they exist. Signed-off-by: Andrei Gherzan Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc index fbb1d395ff8..b2f82e9ac76 100644 --- a/meta/recipes-extended/shadow/shadow.inc +++ b/meta/recipes-extended/shadow/shadow.inc @@ -147,6 +147,13 @@ do_install:append() { # Handle link properly after rename, otherwise missing files would # lead rpm failed dependencies. ln -sf newgrp.${BPN} ${D}${bindir}/sg + + # usermod requires the subuid/subgid files to be in place before being + # able to use the -v/-V flags otherwise it fails: + # usermod: /etc/subuid does not exist, you cannot use the flags -v or -V + install -d ${D}${sysconfdir} + touch ${D}${sysconfdir}/subuid + touch ${D}${sysconfdir}/subgid } PACKAGES =+ "${PN}-base"