Skip to content

Commit

Permalink
sshd: don't use argv[0] as PAM service name
Browse files Browse the repository at this point in the history
sshd would implicitly use argv[0] as the PAM service name to
allow people to select different PAM service names by making
differently-named copies/links to the sshd binary.

Splitting sshd into sshd/sshd-session broke this, as the process
that starts PAM is always sshd-session and the user has no control
over this.

Hardcode "sshd" as the default PAM service name unless/until we
figure out a better way. Should unbreak OSX integration tests.
  • Loading branch information
djmdjm committed Jun 13, 2024
1 parent bf204bd commit a8fbe2f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions auth-pam.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@
#endif

#if !defined(SSHD_PAM_SERVICE)
extern char *__progname;
# define SSHD_PAM_SERVICE __progname
# define SSHD_PAM_SERVICE "sshd"
#endif

/* OpenGroup RFC86.0 and XSSO specify no "const" on arguments */
Expand Down

0 comments on commit a8fbe2f

Please sign in to comment.