2 * Copyright (c) 2002-2003 Networks Associates Technology, Inc.
5 * This software was developed for the FreeBSD Project by ThinkSec AS and
6 * Network Associates Laboratories, the Security Research Division of
7 * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
8 * ("CBOSS"), as part of the DARPA CHATS research program.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
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
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
34 * $P4: //depot/projects/openpam/include/security/pam_appl.h#14 $
37 #ifndef _PAM_APPL_H_INCLUDED
38 #define _PAM_APPL_H_INCLUDED
40 #include <security/pam_types.h>
41 #include <security/pam_constants.h>
52 pam_acct_mgmt(pam_handle_t *_pamh,
56 pam_authenticate(pam_handle_t *_pamh,
60 pam_chauthtok(pam_handle_t *_pamh,
64 pam_close_session(pam_handle_t *_pamh,
68 pam_end(pam_handle_t *_pamh,
72 pam_get_data(pam_handle_t *_pamh,
73 const char *_module_data_name,
77 pam_get_item(pam_handle_t *_pamh,
82 pam_get_user(pam_handle_t *_pamh,
87 pam_getenv(pam_handle_t *_pamh,
91 pam_getenvlist(pam_handle_t *_pamh);
94 pam_open_session(pam_handle_t *_pamh,
98 pam_putenv(pam_handle_t *_pamh,
99 const char *_namevalue);
102 pam_set_data(pam_handle_t *_pamh,
103 const char *_module_data_name,
105 void (*_cleanup)(pam_handle_t *_pamh,
107 int _pam_end_status));
110 pam_set_item(pam_handle_t *_pamh,
115 pam_setcred(pam_handle_t *_pamh,
119 pam_start(const char *_service,
121 const struct pam_conv *_pam_conv,
122 pam_handle_t **_pamh);
125 pam_strerror(pam_handle_t *_pamh,
129 * Single Sign-On extensions
133 pam_authenticate_secondary(pam_handle_t *_pamh,
134 char *_target_username,
135 char *_target_module_type,
136 char *_target_authn_domain,
137 char *_target_supp_data,
138 char *_target_module_authtok,
142 pam_get_mapped_authtok(pam_handle_t *_pamh,
143 const char *_target_module_username,
144 const char *_target_module_type,
145 const char *_target_authn_domain,
146 size_t *_target_authtok_len,
147 unsigned char **_target_module_authtok);
150 pam_get_mapped_username(pam_handle_t *_pamh,
151 const char *_src_username,
152 const char *_src_module_type,
153 const char *_src_authn_domain,
154 const char *_target_module_type,
155 const char *_target_authn_domain,
156 char **_target_module_username);
159 pam_set_mapped_authtok(pam_handle_t *_pamh,
160 const char *_target_module_username,
161 size_t _target_authtok_len,
162 unsigned char *_target_module_authtok,
163 const char *_target_module_type,
164 const char *_target_authn_domain);
167 pam_set_mapped_username(pam_handle_t *_pamh,
169 char *_src_module_type,
170 char *_src_authn_domain,
171 char *_target_module_username,
172 char *_target_module_type,
173 char *_target_authn_domain);