mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Linux-PAM's pam_start(3) fails with a bogus error message if passed the
pam_conv argument is NULL. OpenPAM doesn't care, but to make things easier for people porting this code to other systems (or -STABLE), use a dummy struct pam_conv instead of NULL. Pointed out by: Damien Miller <djm@mindrot.org>
This commit is contained in:
parent
b946f5e1ff
commit
2adf4e49c2
1 changed files with 2 additions and 1 deletions
|
|
@ -242,6 +242,7 @@ pam_cleanup(void *arg)
|
|||
static int
|
||||
pam_init(const char *user)
|
||||
{
|
||||
struct pam_conv no_conv = { NULL, NULL };
|
||||
extern ServerOptions options;
|
||||
extern u_int utmp_len;
|
||||
const char *pam_rhost, *pam_user;
|
||||
|
|
@ -257,7 +258,7 @@ pam_init(const char *user)
|
|||
pam_handle = NULL;
|
||||
}
|
||||
debug("PAM: initializing for \"%s\"", user);
|
||||
pam_err = pam_start("sshd", user, NULL, &pam_handle);
|
||||
pam_err = pam_start("sshd", user, &no_conv, &pam_handle);
|
||||
if (pam_err != PAM_SUCCESS)
|
||||
return (-1);
|
||||
pam_rhost = get_remote_name_or_ip(utmp_len,
|
||||
|
|
|
|||
Loading…
Reference in a new issue