1*1c7715ddSchristos /* $NetBSD: auth-pam.h,v 1.11 2024/07/08 22:33:43 christos Exp $ */ 2313c6c94Schristos /* 3313c6c94Schristos * Copyright (c) 2000 Damien Miller. All rights reserved. 4313c6c94Schristos * 5313c6c94Schristos * Redistribution and use in source and binary forms, with or without 6313c6c94Schristos * modification, are permitted provided that the following conditions 7313c6c94Schristos * are met: 8313c6c94Schristos * 1. Redistributions of source code must retain the above copyright 9313c6c94Schristos * notice, this list of conditions and the following disclaimer. 10313c6c94Schristos * 2. Redistributions in binary form must reproduce the above copyright 11313c6c94Schristos * notice, this list of conditions and the following disclaimer in the 12313c6c94Schristos * documentation and/or other materials provided with the distribution. 13313c6c94Schristos * 14313c6c94Schristos * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15313c6c94Schristos * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16313c6c94Schristos * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17313c6c94Schristos * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18313c6c94Schristos * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19313c6c94Schristos * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20313c6c94Schristos * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21313c6c94Schristos * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22313c6c94Schristos * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23313c6c94Schristos * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24313c6c94Schristos */ 25313c6c94Schristos 26313c6c94Schristos #include "includes.h" 27313c6c94Schristos #ifdef USE_PAM 28313c6c94Schristos 29ffae97bbSchristos struct ssh; 30313c6c94Schristos 31aa36fcacSchristos void start_pam(struct ssh *); 32313c6c94Schristos void finish_pam(void); 33313c6c94Schristos u_int do_pam_account(void); 34ffae97bbSchristos void do_pam_session(struct ssh *); 35*1c7715ddSchristos void do_pam_setcred(void); 36313c6c94Schristos void do_pam_chauthtok(void); 37ffae97bbSchristos int do_pam_putenv(const char *, char *); 38313c6c94Schristos char ** fetch_pam_environment(void); 39313c6c94Schristos char ** fetch_pam_child_environment(void); 40313c6c94Schristos void free_pam_environment(char **); 41313c6c94Schristos void sshpam_thread_cleanup(void); 42313c6c94Schristos void sshpam_cleanup(void); 43313c6c94Schristos int sshpam_auth_passwd(Authctxt *, const char *); 44ffae97bbSchristos int sshpam_get_maxtries_reached(void); 45ffae97bbSchristos void sshpam_set_maxtries_reached(int); 46313c6c94Schristos int is_pam_session_open(void); 47313c6c94Schristos 48313c6c94Schristos #endif /* USE_PAM */ 49