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