auth-pam.h revision 76287
1/* 2 * OpenSSH PAM authentication support. 3 * 4 * $FreeBSD: head/crypto/openssh/auth-pam.h 76287 2001-05-05 01:12:45Z green $ 5 */ 6#ifndef AUTH_PAM_H 7#define AUTH_PAM_H 8#include "includes.h" 9#ifdef USE_PAM 10 11#include "auth.h" 12#include <pwd.h> /* For struct passwd */ 13 14void start_pam(struct passwd *pw); 15void finish_pam(void); 16int auth_pam_password(Authctxt *authctxt, const char *password); 17char **fetch_pam_environment(void); 18int do_pam_account(char *username, char *remote_user); 19void do_pam_session(char *username, const char *ttyname); 20void do_pam_setcred(void); 21void print_pam_messages(void); 22int pam_password_change_required(void); 23void do_pam_chauthtok(void); 24 25struct inverted_pam_cookie { 26 int state; /* Which state have we reached? */ 27 pid_t pid; /* PID of child process */ 28 29 /* Only valid in state STATE_CONV */ 30 int num_msg; /* Number of messages */ 31 struct pam_message **msg; /* Message structures */ 32 struct pam_response **resp; /* Response structures */ 33 struct inverted_pam_userdata *userdata; 34}; 35void ipam_free_cookie(struct inverted_pam_cookie *cookie); 36struct inverted_pam_cookie *ipam_start_auth(const char *, const char *); 37 38#endif /* USE_PAM */ 39#endif /* AUTH_PAM_H */ 40