HomeFreeBSD

login: Use getpwnam_r() instead of getpwnam().

Description

login: Use getpwnam_r() instead of getpwnam().

Since we expect the entry to still be valid after calling into PAM,
which may call getpwnam() itself, we need to use getpwnam_r().

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans, imp, allanjude, markj
Differential Revision: https://reviews.freebsd.org/D43376

(cherry picked from commit a3d80dd8aa6ac15877e00102ab174b417ac81d79)

login: Missed an instance of getpwnam().

Fixes: a3d80dd8aa6ac15877e00102ab174b417ac81d79
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D43423

(cherry picked from commit 1e25eb287f3fdd763df98065dbf2e1eb201e4000)

Details

Provenance
desAuthored on Jan 12 2024, 3:40 PM
Reviewer
kevans
Differential Revision
D43376: login: Use getpwnam_r() instead of getpwnam().
Parents
rGed1967df2de8: asa: Rewrite to fix line termination issue.
Branches
Unknown
Tags
Unknown