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