2 * <security/pam_appl.h>
4 * This header file collects definitions for the PAM API --- that is,
5 * public interface between the PAM library and an application program
6 * that wishes to use it.
8 * Note, the copyright information is at end of file.
9 * $FreeBSD: src/contrib/libpam/libpam/include/security/pam_appl.h,v 1.1.1.1.6.2 2001/06/11 15:28:14 markm Exp $
11 * Created: 15-Jan-96 by TYT
12 * Last modified: 1996/3/5 by AGM
14 * $Log: pam_appl.h,v $
15 * Revision 1.5 1996/11/10 19:56:11 morgan
16 * minor prototype change
18 * Revision 1.4 1996/03/16 22:38:17 morgan
19 * made all of the pam_start input arguments constant
21 * Revision 1.3 1996/03/16 20:22:59 morgan
22 * changed name comment at top of file.
24 * Revision 1.2 1996/03/09 20:39:06 morgan
25 * added RCS information
28 * $Id: pam_appl.h,v 1.5 1996/11/10 19:56:11 morgan Exp $
32 #ifndef _SECURITY_PAM_APPL_H
33 #define _SECURITY_PAM_APPL_H
35 #include <security/_pam_types.h> /* Linux-PAM common defined types */
37 /* -------------- The Linux-PAM Framework layer API ------------- */
39 extern int pam_start(const char *service_name, const char *user,
40 const struct pam_conv *pam_conversation,
42 extern int pam_end(pam_handle_t *pamh, int pam_status);
44 /* Authentication API's */
46 extern int pam_authenticate(pam_handle_t *pamh, int flags);
47 extern int pam_setcred(pam_handle_t *pamh, int flags);
49 /* Account Management API's */
51 extern int pam_acct_mgmt(pam_handle_t *pamh, int flags);
53 /* Session Management API's */
55 extern int pam_open_session(pam_handle_t *pamh, int flags);
56 extern int pam_close_session(pam_handle_t *pamh, int flags);
58 /* Password Management API's */
60 extern int pam_chauthtok(pam_handle_t *pamh, int flags);
62 /* take care of any compatibility issues */
63 #include <security/_pam_compat.h>
66 * Copyright Theodore Ts'o, 1996. All rights reserved.
68 * Redistribution and use in source and binary forms, with or without
69 * modification, are permitted provided that the following conditions
71 * 1. Redistributions of source code must retain the above copyright
72 * notice, and the entire permission notice in its entirety,
73 * including the disclaimer of warranties.
74 * 2. Redistributions in binary form must reproduce the above copyright
75 * notice, this list of conditions and the following disclaimer in the
76 * documentation and/or other materials provided with the distribution.
77 * 3. The name of the author may not be used to endorse or promote
78 * products derived from this software without specific prior
81 * ALTERNATIVELY, this product may be distributed under the terms of
82 * the GNU Public License, in which case the provisions of the GPL are
83 * required INSTEAD OF the above restrictions. (This clause is
84 * necessary due to a potential bad interaction between the GPL and
85 * the restrictions contained in a BSD-style copyright.)
87 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
88 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
89 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
90 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
91 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
92 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
93 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
94 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
95 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
96 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
97 * OF THE POSSIBILITY OF SUCH DAMAGE.
100 #endif /* _SECURITY_PAM_APPL_H */