Closed developerdong closed 10 months ago
Looks like a valid finding to me. Do you want to write such a patch and send it to the mailing list?
@developerdong thanks for detailed analysis, this really need to be fixed. @jan-kiszka I will send a patch to the maillist soon if no objections.
@amikan I would have used that as training for a potential new contributor :wink: - if @developerdong is interested.
Problem description
When add >1 new users in bb files,
do_rootfs_quality_check
reports this warning. For example:USERS = "user1"
is fine, because it only creates one new user.USERS = "user1 user2"
is problematic, because it creates two new users.USERS = "user1 daemon"
is fine, because daemon is an existing user, only user1 is newly created.USERS = "user1 user2 daemon"
is not ok, because there are still two new users except for daemon.Expected / desired behavior
No warnings when adding >1 new users.
Actual behavior
There are warnings.
How to reproduce
Add
USERS += "user1 user2"
in your bb files, build it, then you can see the warnings.Possible root cause
Here is the print when I execute
useradd
in a debian 11 docker container.From the print, we can see that some files are created/changed. In image_create_users,
useradd
is executed, which is indirectly included in ROOTFS_POSTPROCESS_COMMAND.Meanwhile,
subgid-
,subuid-
, andpasswd-
are not ignored in do_rootfs_quality_check.Possible solution
Ignore
subgid-
,subuid-
, andpasswd-
in do_rootfs_quality_check.