1 /* $Id: auth-pam.h,v 1.16 2002/07/23 00:44:07 stevesk Exp $ */
2 /* $FreeBSD: src/crypto/openssh/auth-pam.h,v 1.2.2.4 2003/02/03 17:31:06 des Exp $ */
3 /* $DragonFly: src/crypto/openssh/Attic/auth-pam.h,v 1.2 2003/06/17 04:24:36 dillon Exp $ */
6 * Copyright (c) 2000 Damien Miller. All rights reserved.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 #if !defined(SSHD_PAM_SERVICE)
33 # define SSHD_PAM_SERVICE __progname
36 void start_pam(const char *user);
37 void finish_pam(void);
38 int auth_pam_password(Authctxt *authctxt, const char *password);
39 char **fetch_pam_environment(void);
40 void free_pam_environment(char **env);
41 int do_pam_authenticate(int flags);
42 int do_pam_account(const char *username, const char *remote_user);
43 void do_pam_session(const char *username, const char *ttyname);
44 void do_pam_setcred(int init);
45 void print_pam_messages(void);
46 int is_pam_password_change_required(void);
47 void do_pam_chauthtok(void);
48 void do_pam_set_conv(struct pam_conv *);
49 void message_cat(char **p, const char *a);