Line data Source code
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 : */
10 :
11 : #ifndef _SECURITY_PAM_APPL_H
12 : #define _SECURITY_PAM_APPL_H
13 :
14 : #ifdef __cplusplus
15 : extern "C" {
16 : #endif
17 :
18 : #include <security/_pam_types.h> /* Linux-PAM common defined types */
19 :
20 : /* -------------- The Linux-PAM Framework layer API ------------- */
21 :
22 : extern int PAM_NONNULL((1,3,4))
23 250 : pam_start(const char *service_name, const char *user,
24 : const struct pam_conv *pam_conversation,
25 : pam_handle_t **pamh);
26 :
27 : extern int PAM_NONNULL((1,3,5))
28 : pam_start_confdir(const char *service_name, const char *user,
29 : const struct pam_conv *pam_conversation,
30 : const char *confdir, pam_handle_t **pamh);
31 :
32 : extern int PAM_NONNULL((1))
33 250 : pam_end(pam_handle_t *pamh, int pam_status);
34 :
35 : /* Authentication API's */
36 :
37 : extern int PAM_NONNULL((1))
38 238 : pam_authenticate(pam_handle_t *pamh, int flags);
39 :
40 : extern int PAM_NONNULL((1))
41 2 : pam_setcred(pam_handle_t *pamh, int flags);
42 :
43 : /* Account Management API's */
44 :
45 : extern int PAM_NONNULL((1))
46 0 : pam_acct_mgmt(pam_handle_t *pamh, int flags);
47 :
48 : /* Session Management API's */
49 :
50 : extern int PAM_NONNULL((1))
51 0 : pam_open_session(pam_handle_t *pamh, int flags);
52 :
53 : extern int PAM_NONNULL((1))
54 0 : pam_close_session(pam_handle_t *pamh, int flags);
55 :
56 : /* Password Management API's */
57 :
58 : extern int PAM_NONNULL((1))
59 12 : pam_chauthtok(pam_handle_t *pamh, int flags);
60 :
61 :
62 : /* take care of any compatibility issues */
63 : #include <security/_pam_compat.h>
64 :
65 : #ifdef __cplusplus
66 : }
67 : #endif
68 :
69 : /*
70 : * Copyright Theodore Ts'o, 1996. All rights reserved.
71 : *
72 : * Redistribution and use in source and binary forms, with or without
73 : * modification, are permitted provided that the following conditions
74 : * are met:
75 : * 1. Redistributions of source code must retain the above copyright
76 : * notice, and the entire permission notice in its entirety,
77 : * including the disclaimer of warranties.
78 : * 2. Redistributions in binary form must reproduce the above copyright
79 : * notice, this list of conditions and the following disclaimer in the
80 : * documentation and/or other materials provided with the distribution.
81 : * 3. The name of the author may not be used to endorse or promote
82 : * products derived from this software without specific prior
83 : * written permission.
84 : *
85 : * ALTERNATIVELY, this product may be distributed under the terms of
86 : * the GNU Public License, in which case the provisions of the GPL are
87 : * required INSTEAD OF the above restrictions. (This clause is
88 : * necessary due to a potential bad interaction between the GPL and
89 : * the restrictions contained in a BSD-style copyright.)
90 : *
91 : * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
92 : * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
93 : * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
94 : * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
95 : * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
96 : * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
97 : * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
98 : * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
99 : * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
100 : * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
101 : * OF THE POSSIBILITY OF SUCH DAMAGE.
102 : */
103 :
104 : #endif /* _SECURITY_PAM_APPL_H */
|