pam_appl.h revision 91094
191100Sdes/*- 2115619Sdes * Copyright (c) 2002 Networks Associates Technologies, Inc. 391100Sdes * All rights reserved. 491100Sdes * 591100Sdes * This software was developed for the FreeBSD Project by ThinkSec AS and 699158Sdes * NAI Labs, the Security Research Division of Network Associates, Inc. 799158Sdes * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the 899158Sdes * DARPA CHATS research program. 991100Sdes * 1091100Sdes * Redistribution and use in source and binary forms, with or without 1191100Sdes * modification, are permitted provided that the following conditions 1291100Sdes * are met: 1391100Sdes * 1. Redistributions of source code must retain the above copyright 1491100Sdes * notice, this list of conditions and the following disclaimer. 1591100Sdes * 2. Redistributions in binary form must reproduce the above copyright 1691100Sdes * notice, this list of conditions and the following disclaimer in the 1791100Sdes * documentation and/or other materials provided with the distribution. 1891100Sdes * 3. The name of the author may not be used to endorse or promote 1991100Sdes * products derived from this software without specific prior written 2091100Sdes * permission. 2191100Sdes * 2291100Sdes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 2391100Sdes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2491100Sdes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2591100Sdes * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 2691100Sdes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2791100Sdes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2891100Sdes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2991100Sdes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3091100Sdes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3191100Sdes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3291100Sdes * SUCH DAMAGE. 3391100Sdes * 34115619Sdes * $Id$ 3591100Sdes */ 3691100Sdes 3791100Sdes#ifndef _PAM_APPL_H_INCLUDED 3891100Sdes#define _PAM_APPL_H_INCLUDED 3991100Sdes 4091100Sdes#include <security/pam_types.h> 4191100Sdes#include <security/pam_constants.h> 4291100Sdes 4391100Sdes#ifdef __cplusplus 4491100Sdesextern "C" { 4591100Sdes#endif 4691100Sdes 4791100Sdes/* 4891100Sdes * XSSO 4.2.1, 6 4991100Sdes */ 5091100Sdes 5191100Sdesint 5291100Sdespam_acct_mgmt(pam_handle_t *_pamh, 5391100Sdes int _flags); 5491100Sdes 5591100Sdesint 5691100Sdespam_authenticate(pam_handle_t *_pamh, 5791100Sdes int _flags); 5891100Sdes 5991100Sdesint 60107937Sdespam_chauthtok(pam_handle_t *_pamh, 61107937Sdes int _flags); 6291100Sdes 6391100Sdesint 6491100Sdespam_close_session(pam_handle_t *_pamh, 6591100Sdes int _flags); 6691100Sdes 67int 68pam_end(pam_handle_t *_pamh, 69 int _status); 70 71int 72pam_get_data(pam_handle_t *_pamh, 73 const char *_module_data_name, 74 void **_data); 75 76int 77pam_get_item(pam_handle_t *_pamh, 78 int _item_type, 79 const void **_item); 80 81int 82pam_get_user(pam_handle_t *_pamh, 83 const char **_user, 84 const char *_prompt); 85 86char * 87pam_getenv(pam_handle_t *_pamh, 88 const char *_name); 89 90char ** 91pam_getenvlist(pam_handle_t *_pamh); 92 93int 94pam_open_session(pam_handle_t *_pamh, 95 int _flags); 96 97int 98pam_putenv(pam_handle_t *_pamh, 99 const char *_namevalue); 100 101int 102pam_set_data(pam_handle_t *_pamh, 103 const char *_module_data_name, 104 void *_data, 105 void (*_cleanup)(pam_handle_t *_pamh, 106 void *_data, 107 int _pam_end_status)); 108 109int 110pam_set_item(pam_handle_t *_pamh, 111 int _item_type, 112 const void *_item); 113 114int 115pam_setcred(pam_handle_t *_pamh, 116 int _flags); 117 118int 119pam_start(const char *_service, 120 const char *_user, 121 const struct pam_conv *_pam_conv, 122 pam_handle_t **_pamh); 123 124const char * 125pam_strerror(pam_handle_t *_pamh, 126 int _error_number); 127 128/* 129 * Single Sign-On extensions 130 */ 131#if 0 132int 133pam_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, 139 int _flags); 140 141int 142pam_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); 148 149int 150pam_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); 157 158int 159pam_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); 165 166int 167pam_set_mapped_username(pam_handle_t *_pamh, 168 char *_src_username, 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); 174#endif /* 0 */ 175 176#ifdef __cplusplus 177} 178#endif 179 180#endif 181