Skip to content

openrc-user: buffer returned by getpwname() may not survive pam_open_session #979

Description

@salahcoronya

pam_sss, part of sssd interacts strangely with openrc-user. Users get the following result:

pam_unix(openrc-user:session): session opened for user salahx(uid=10000) by salahx(uid=0)
wg-netifrc nologin[2075]: Attempted login by salahx (UID: 543) on UNKNOWN
pam_unix(openrc-user:session): session closed for user salahx

Since openrc-user doesn't "own" the struct return by getpwnam, when pam_sss calls it, it clobbers our copy with its. So it true to login to as the sssd user, which has a nologin shell, and fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions