Initial import from FreeBSD RELENG_4:
[games.git] / contrib / libpam / libpam / include / security / pam_appl.h
1 /*
2  * <security/pam_appl.h>
3  * 
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.
7  *
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  *
11  * Created: 15-Jan-96 by TYT
12  * Last modified: 1996/3/5 by AGM
13  *
14  * $Log: pam_appl.h,v $
15  * Revision 1.5  1996/11/10 19:56:11  morgan
16  * minor prototype change
17  *
18  * Revision 1.4  1996/03/16 22:38:17  morgan
19  * made all of the pam_start input arguments constant
20  *
21  * Revision 1.3  1996/03/16 20:22:59  morgan
22  * changed name comment at top of file.
23  *
24  * Revision 1.2  1996/03/09 20:39:06  morgan
25  * added RCS information
26  *
27  *
28  * $Id: pam_appl.h,v 1.5 1996/11/10 19:56:11 morgan Exp $
29  *
30  */
31
32 #ifndef _SECURITY_PAM_APPL_H
33 #define _SECURITY_PAM_APPL_H
34
35 #include <security/_pam_types.h>      /* Linux-PAM common defined types */
36
37 /* -------------- The Linux-PAM Framework layer API ------------- */
38
39 extern int pam_start(const char *service_name, const char *user,
40                      const struct pam_conv *pam_conversation,
41                      pam_handle_t **pamh);
42 extern int pam_end(pam_handle_t *pamh, int pam_status);
43
44 /* Authentication API's */
45
46 extern int pam_authenticate(pam_handle_t *pamh, int flags);
47 extern int pam_setcred(pam_handle_t *pamh, int flags);
48
49 /* Account Management API's */
50
51 extern int pam_acct_mgmt(pam_handle_t *pamh, int flags);
52
53 /* Session Management API's */
54
55 extern int pam_open_session(pam_handle_t *pamh, int flags);
56 extern int pam_close_session(pam_handle_t *pamh, int flags);
57
58 /* Password Management API's */
59
60 extern int pam_chauthtok(pam_handle_t *pamh, int flags);
61
62 /* take care of any compatibility issues */
63 #include <security/_pam_compat.h>
64
65 /*
66  * Copyright Theodore Ts'o, 1996.  All rights reserved.
67  *
68  * Redistribution and use in source and binary forms, with or without
69  * modification, are permitted provided that the following conditions
70  * are met:
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
79  *    written permission.
80  * 
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.)
86  * 
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.
98  */
99
100 #endif /* _SECURITY_PAM_APPL_H */