Skip to content

Groups added by pam_group are not added by sudo #1665

Description

@squell

See #1660, this is the second item identified in that issue.

To reproduce:

  • Add pam_group.so to the PAM auth stack
  • Add a line like *;*;testuser;Al0000-2400;testgroup to /etc/security/group.conf
  • Run sudo -utestuser id and notice that testgroup hasn't been added.

Related in ogsudo:

        * src/sudo.c:
        Do group setup in policy_init_session() before calling out to the
        plugin. This makes it possible for the pam_group module to change
        the group in pam_setcred(). It's a bit bogus since pam_setcred() is
        documented as not changing the group or user ID, but pam_group is
        shipped with stock Linux-PAM so we need to support it.
        [f88da1c1a]

sudo-project/sudo@f88da1c1a

I'm not convinced that we need this, so let's first discuss if that's the case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-execExecution component (interfacing with OS)C-pamPAM libraryconsultationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions