]> code.ossystems Code Review - openembedded-core.git/commitdiff
systemd: Ensure uid/gid ranges are set deterministically
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 19 Dec 2020 11:20:31 +0000 (11:20 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 20 Dec 2020 00:03:01 +0000 (00:03 +0000)
meson.build will fall back to greping /etc/login.defs for values of these
if they're not set. Different distros set them (Centos 7/8 does, Ubuntu
does not) so output was not deterministic. Avoid this by setting to the
default values. We now match the vaules from login.defs from shadow.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/systemd/systemd_247.2.bb

index 15f8cb3d7187e35ae8d5f86833298b0c57cf8c61..5eea78eff3535d7f933460a75ce90a2efe0607df 100644 (file)
@@ -213,6 +213,10 @@ EXTRA_OEMESON += "-Dnobody-user=nobody \
                   -Drootprefix=${rootprefix} \
                   -Ddefault-locale=C \
                   -Dmode=release \
+                  -Dsystem-alloc-uid-min=101 \
+                  -Dsystem-uid-max=999 \
+                  -Dsystem-alloc-gid-min=101 \
+                  -Dsystem-gid-max=999 \
                   "
 
 # Hardcode target binary paths to avoid using paths from sysroot