]> code.ossystems Code Review - openembedded-core.git/commit
useradd-staticids.bbclass: Simplify the logic for when to add groups
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Fri, 18 Dec 2015 23:53:50 +0000 (00:53 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 17 Jan 2016 11:32:20 +0000 (11:32 +0000)
commite98e98ce65cf9ffdef29462310a622ffddd1412b
treecab81d054bec23cce1c25a19c52227df48f9fcd3
parent274d38a6e2183ec88335a08b963f26c34b328558
useradd-staticids.bbclass: Simplify the logic for when to add groups

The original code was near impossible to follow, and missed a couple
of cases. For example, if one added the following line to the passwd
file specified in USERADD_UID_TABLES:

foobar:x:12345:nogroup::/:/bin/sh

and then specified the user as:

USERADD_PARAM_${PN} = "--system foobar"

one would then assume that the foobar user would be created with the
primary group set to nogroup. However, it was not (the primary group
would be foobar), and the only way to get it correct was to explicitly
add --gid nogroup to the USERADD_PARAM_${PN}.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/useradd-staticids.bbclass