source: openpam/trunk/include/security/pam_appl.h @ 38

Last change on this file since 38 was 38, checked in by Dag-Erling Smørgrav, 17 years ago

Constify.

Sponsored by: DARPA, NAI Labs

  • Property svn:keywords set to Id LastChangedRevision HeadURL LastChangedDate LastChangedBy
File size: 4.7 KB
Line 
1/*-
2 * Copyright (c) 2002 Networks Associates Technologies, 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 * $Id: pam_appl.h 38 2002-02-06 16:03:39Z des $
35 */
36
37#ifndef _PAM_APPL_H_INCLUDED
38#define _PAM_APPL_H_INCLUDED
39
40#include <security/pam_types.h>
41#include <security/pam_constants.h>
42
43/*
44 * XSSO 4.2.1, 6
45 */
46
47int
48pam_acct_mgmt(pam_handle_t *_pamh,
49        int _flags);
50
51int
52pam_authenticate(pam_handle_t *_pamh,
53        int _flags);
54
55int
56pam_chauthtok(pam_handle_t *_pamh,
57        int _flags);
58
59int
60pam_close_session(pam_handle_t *_pamh,
61        int _flags);
62
63int
64pam_end(pam_handle_t *_pamh,
65        int _status);
66
67int
68pam_get_data(pam_handle_t *_pamh,
69        const char *_module_data_name,
70        void **_data);
71
72int
73pam_get_item(pam_handle_t *_pamh,
74        int _item_type,
75        const void **_item);
76
77int
78pam_get_user(pam_handle_t *_pamh,
79        const char **_user,
80        const char *_prompt);
81
82char *
83pam_getenv(pam_handle_t *_pamh,
84        const char *_name);
85
86char **
87pam_getenvlist(pam_handle_t *_pamh);
88
89int
90pam_open_session(pam_handle_t *_pamh,
91        int _flags);
92
93int
94pam_putenv(pam_handle_t *_pamh,
95        const char *_namevalue);
96
97int
98pam_set_data(pam_handle_t *_pamh,
99        const char *_module_data_name,
100        void *_data,
101        void (*_cleanup)(pam_handle_t *_pamh,
102                void *_data,
103                int _pam_end_status));
104
105int
106pam_set_item(pam_handle_t *_pamh,
107        int _item_type,
108        const void *_item);
109
110int
111pam_setcred(pam_handle_t *_pamh,
112        int _flags);
113
114int
115pam_start(const char *_service,
116        const char *_user,
117        const struct pam_conv *_pam_conv,
118        pam_handle_t **_pamh);
119
120const char *
121pam_strerror(pam_handle_t *_pamh,
122        int _error_number);
123
124/*
125 * OpenPAM extensions
126 */
127int
128pam_error(pam_handle_t *_pamh,
129        const char *_fmt,
130        ...);
131
132int
133pam_get_authtok(pam_handle_t *_pamh,
134        const char **_authtok,
135        const char *_prompt);
136
137int
138pam_info(pam_handle_t *_pamh,
139        const char *_fmt,
140        ...);
141
142int
143pam_prompt(pam_handle_t *pamh,
144        char **resp,
145        int echo,
146        const char *fmt,
147        ...);
148
149int
150pam_setenv(pam_handle_t *_pamh,
151        const char *_name,
152        const char *_value,
153        int overwrite);
154
155/*
156 * Single Sign-On extensions
157 */
158#if 0
159int
160pam_authenticate_secondary(pam_handle_t *_pamh,
161        char *_target_username,
162        char *_target_module_type,
163        char *_target_authn_domain,
164        char *_target_supp_data,
165        char *_target_module_authtok,
166        int _flags);
167
168int
169pam_get_mapped_authtok(pam_handle_t *_pamh,
170        const char *_target_module_username,
171        const char *_target_module_type,
172        const char *_target_authn_domain,
173        size_t *_target_authtok_len,
174        unsigned char **_target_module_authtok);
175
176int
177pam_get_mapped_username(pam_handle_t *_pamh,
178        const char *_src_username,
179        const char *_src_module_type,
180        const char *_src_authn_domain,
181        const char *_target_module_type,
182        const char *_target_authn_domain,
183        char **_target_module_username);
184
185int
186pam_set_mapped_authtok(pam_handle_t *_pamh,
187        const char *_target_module_username,
188        size_t _target_authtok_len,
189        unsigned char *_target_module_authtok,
190        const char *_target_module_type,
191        const char *_target_authn_domain);
192
193int
194pam_set_mapped_username(pam_handle_t *_pamh,
195        char *_src_username,
196        char *_src_module_type,
197        char *_src_authn_domain,
198        char *_target_module_username,
199        char *_target_module_type,
200        char *_target_authn_domain);
201#endif /* 0 */
202
203#endif
Note: See TracBrowser for help on using the repository browser.