Bug 15067

Summary: System groups like sgx, wheel, renderer etc. which are not in any recipe are not being set by useradd-staticids bbclass
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Piotr Łobacz <p.lobacz>
Component: oe-core otherAssignee: Unassigned <unassigned>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Medium+ CC: louis.rannou, randy.macleod, richard.purdie
Version: 4.0.8   
Target Milestone: 4.3 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Piotr Łobacz 2023-03-14 09:39:18 UTC
Like in subject the system groups which are not set in any recipe with GROUPADD_PARAM but are being added by the system, are not being set to the ids given in files/group.

A quick workaround is setting these groups with own recipe in GROUPADD_PARAM variable e.g. GROUPADD_PARAM:${PN} = "--system sgx; --system render; --system wheel"
Comment 1 Piotr Łobacz 2023-03-14 11:29:23 UTC
Additionally I have found this patch https://lists.openembedded.org/g/openembedded-core/message/178290?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3Acreated%2C0%2Csystemd%2C20%2C2%2C0%2C97508370

so sgx is being added by udev... I need to find where is wheel as well.
Comment 2 Piotr Łobacz 2023-03-17 08:56:36 UTC
OK according to mine investigation it is libpam responsible for adding wheel group to /etc/group so i would say that we should also add inside this recipe a GROUPADD_PARAM for the wheel group inside this recipe what do you think?
Comment 3 Richard Purdie 2023-04-27 14:50:16 UTC
sgx was addressed with https://git.yoctoproject.org/poky/commit/?id=72201b63f63e06005038550bc957aef98756c998
were there any others that need fixing?
wheel is added from base-passwd?
Comment 4 Piotr Łobacz 2023-04-28 07:42:35 UTC
Yeah, I have found that sgx is present with that fix. Richard From what I have seen only the wheel was missing for me...
Comment 5 Randy MacLeod 2023-05-04 14:49:31 UTC
Piotr, we don't have anyone to work on this at the moment. - YP Triage.
Comment 6 Louis Rannou 2023-06-22 07:20:21 UTC
Hello ! In a recent patch (that requires a v2), I have suggested to add the wheel group in the base-passwd

https://lore.kernel.org/all/20230618093724c7508d8b@mail.local/

The wheel group can be used by pam, systemd and curl. I don't think it should be in libpam as it's only required when you use the pam_wheel module.
Comment 7 Randy MacLeod 2023-07-26 21:22:03 UTC
Bulk move of 64 bugs to 4.3 M3 after a quick review.
If a bug is actually fixed, please add a commit link and resolve it.
-- Randy for YP bug team.
Comment 8 Louis Rannou 2023-07-27 07:15:27 UTC
commit 5eb501113730ec1040a548a31855acf568bea702
Author: Louis Rannou <lrannou@baylibre.com>
Date:   Thu Jun 15 13:43:55 2023 +0200

    base-passwd: add the wheel group
    
    The wheel group is not declared while it can be used to access the systemd
    journal and to configure printers in CUPS. It can also be used for su and sudo
    permissions.
    
    So far it was created later in the rootfs postcommand systemd_create_users.
    
    (From OE-Core rev: bebe52ae9576393ebb9d7405fc77fba21e84ba5b)
    
    Signed-off-by: Louis Rannou <lrannou@baylibre.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>