Finish committing _more_ somehow-uncommitted OpenSSH 2.9 updates.

(Missing Delta Brigade, tally-ho!)
This commit is contained in:
Brian Feldman 2001-05-05 01:12:45 +00:00
parent 1192d531bf
commit 4c5de86978
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=76287
2 changed files with 11 additions and 5 deletions

View File

@ -28,7 +28,10 @@
#include <security/pam_appl.h>
#include "ssh.h"
#include "xmalloc.h"
#include "log.h"
#include "servconf.h"
#include "readpass.h"
#include "canohost.h"
RCSID("$FreeBSD$");
@ -52,6 +55,7 @@ static struct pam_conv conv = {
static pam_handle_t *pamh = NULL;
static const char *pampasswd = NULL;
static char *pam_msg = NULL;
extern ServerOptions options;
/* states for pamconv() */
typedef enum { INITIAL_LOGIN, OTHER } pamstates;
@ -162,9 +166,9 @@ void pam_cleanup_proc(void *context)
}
/* Attempt password authentation using PAM */
int auth_pam_password(struct passwd *pw, const char *password)
int auth_pam_password(Authctxt *authctxt, const char *password)
{
extern ServerOptions options;
struct passwd *pw = authctxt->pw;
int pam_retval;
/* deny if no user. */
@ -195,9 +199,10 @@ int do_pam_account(char *username, char *remote_user)
{
int pam_retval;
debug("PAM setting rhost to \"%.200s\"", get_canonical_hostname());
debug("PAM setting rhost to \"%.200s\"",
get_canonical_hostname(options.reverse_mapping_check));
pam_retval = pam_set_item(pamh, PAM_RHOST,
get_canonical_hostname());
get_canonical_hostname(options.reverse_mapping_check));
if (pam_retval != PAM_SUCCESS) {
fatal("PAM set rhost failed[%d]: %.200s",
pam_retval, PAM_STRERROR(pamh, pam_retval));

View File

@ -8,11 +8,12 @@
#include "includes.h"
#ifdef USE_PAM
#include "auth.h"
#include <pwd.h> /* For struct passwd */
void start_pam(struct passwd *pw);
void finish_pam(void);
int auth_pam_password(struct passwd *pw, const char *password);
int auth_pam_password(Authctxt *authctxt, const char *password);
char **fetch_pam_environment(void);
int do_pam_account(char *username, char *remote_user);
void do_pam_session(char *username, const char *ttyname);