summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorAndrei Gherzan <andrei.gherzan@huawei.com>2022-08-25 18:30:39 +0200
committerSteve Sakoman <steve@sakoman.com>2022-08-31 04:16:07 -1000
commit5cdc9c1809ef169b8af7ce3085f316d1e68eb7ec (patch)
treec4c7082cb09f5c5af4f838b77066700f29c5215f /meta/recipes-extended
parentcb51e97f66285d64d188379aff6282ba597c49e9 (diff)
downloadopenembedded-core-contrib-5cdc9c1809ef169b8af7ce3085f316d1e68eb7ec.tar.gz
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 <andrei.gherzan@huawei.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/shadow/shadow.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc
index f5fdf436f7..b3ae2b4874 100644
--- a/meta/recipes-extended/shadow/shadow.inc
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -149,6 +149,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"