pam_modules.h revision 92289
1/*-
2 * Copyright (c) 2002 Networks Associates Technology, Inc.
3 * All rights reserved.
4 *
5 * This software was developed for the FreeBSD Project by ThinkSec AS and
6 * NAI Labs, the Security Research Division of Network Associates, Inc.
7 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
8 * DARPA CHATS research program.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 *    notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 *    notice, this list of conditions and the following disclaimer in the
17 *    documentation and/or other materials provided with the distribution.
18 * 3. The name of the author may not be used to endorse or promote
19 *    products derived from this software without specific prior written
20 *    permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * $P4: //depot/projects/openpam/include/security/pam_modules.h#6 $
35 */
36
37#ifndef _PAM_MODULES_H_INCLUDED
38#define _PAM_MODULES_H_INCLUDED
39
40#include <security/pam_types.h>
41#include <security/pam_constants.h>
42#include <security/openpam.h>
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48/*
49 * XSSO 4.2.2, 6
50 */
51
52PAM_EXTERN int
53pam_sm_acct_mgmt(pam_handle_t *_pamh,
54	int _flags,
55	int _argc,
56	const char **_argv);
57
58PAM_EXTERN int
59pam_sm_authenticate(pam_handle_t *_pamh,
60	int _flags,
61	int _argc,
62	const char **_argv);
63
64PAM_EXTERN int
65pam_sm_chauthtok(pam_handle_t *_pamh,
66	int _flags,
67	int _argc,
68	const char **_argv);
69
70PAM_EXTERN int
71pam_sm_close_session(pam_handle_t *_pamh,
72	int _flags,
73	int _args,
74	const char **_argv);
75
76PAM_EXTERN int
77pam_sm_open_session(pam_handle_t *_pamh,
78	int _flags,
79	int _argc,
80	const char **_argv);
81
82PAM_EXTERN int
83pam_sm_setcred(pam_handle_t *_pamh,
84	int _flags,
85	int _argc,
86	const char **_argv);
87
88/*
89 * Single Sign-On extensions
90 */
91#if 0
92PAM_EXTERN int
93pam_sm_authenticate_secondary(pam_handle_t *_pamh,
94	char *_target_username,
95	char *_target_module_type,
96	char *_target_authn_domain,
97	char *_target_supp_data,
98	unsigned char *_target_module_authtok,
99	int _flags,
100	int _argc,
101	const char **_argv);
102
103PAM_EXTERN int
104pam_sm_get_mapped_authtok(pam_handle_t *_pamh,
105	char *_target_module_username,
106	char *_target_module_type,
107	char *_target_authn_domain,
108	size_t *_target_authtok_len,
109	unsigned char **_target_module_authtok,
110	int _argc,
111	char *_argv);
112
113PAM_EXTERN int
114pam_sm_get_mapped_username(pam_handle_t *_pamh,
115	char *_src_username,
116	char *_src_module_type,
117	char *_src_authn_domain,
118	char *_target_module_type,
119	char *_target_authn_domain,
120	char **_target_module_username,
121	int _argc,
122	const char **_argv);
123
124PAM_EXTERN int
125pam_sm_set_mapped_authtok(pam_handle_t *_pamh,
126	char *_target_module_username,
127	size_t _target_authtok_len,
128	unsigned char *_target_module_authtok,
129	char *_target_module_type,
130	char *_target_authn_domain,
131	int _argc,
132	const char *_argv);
133
134PAM_EXTERN int
135pam_sm_set_mapped_username(pam_handle_t *_pamh,
136	char *_target_module_username,
137	char *_target_module_type,
138	char *_target_authn_domain,
139	int _argc,
140	const char **_argv);
141
142#endif /* 0 */
143
144#ifdef __cplusplus
145}
146#endif
147
148#endif
149