pam_appl.h revision 303975
160484Sobrien/*- 260484Sobrien * Copyright (c) 2002-2003 Networks Associates Technology, Inc. 360484Sobrien * Copyright (c) 2004-2011 Dag-Erling Sm��rgrav 460484Sobrien * All rights reserved. 560484Sobrien * 660484Sobrien * This software was developed for the FreeBSD Project by ThinkSec AS and 760484Sobrien * Network Associates Laboratories, the Security Research Division of 860484Sobrien * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 960484Sobrien * ("CBOSS"), as part of the DARPA CHATS research program. 1060484Sobrien * 1160484Sobrien * Redistribution and use in source and binary forms, with or without 1260484Sobrien * modification, are permitted provided that the following conditions 1360484Sobrien * are met: 1460484Sobrien * 1. Redistributions of source code must retain the above copyright 1560484Sobrien * notice, this list of conditions and the following disclaimer. 1660484Sobrien * 2. Redistributions in binary form must reproduce the above copyright 1760484Sobrien * notice, this list of conditions and the following disclaimer in the 1860484Sobrien * documentation and/or other materials provided with the distribution. 1960484Sobrien * 3. The name of the author may not be used to endorse or promote 2060484Sobrien * products derived from this software without specific prior written 2160484Sobrien * permission. 2260484Sobrien * 2360484Sobrien * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 2460484Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2560484Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2660484Sobrien * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 2760484Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2860484Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2960484Sobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 3060484Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3160484Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3260484Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3360484Sobrien * SUCH DAMAGE. 3460484Sobrien * 3560484Sobrien * $Id: pam_appl.h 648 2013-03-05 17:54:27Z des $ 3660484Sobrien */ 3760484Sobrien 3860484Sobrien#ifndef SECURITY_PAM_APPL_H_INCLUDED 3960484Sobrien#define SECURITY_PAM_APPL_H_INCLUDED 4060484Sobrien 4160484Sobrien#include <security/pam_types.h> 4260484Sobrien#include <security/pam_constants.h> 4360484Sobrien#include <security/openpam_attr.h> 4460484Sobrien 4560484Sobrien#ifdef __cplusplus 4660484Sobrienextern "C" { 4760484Sobrien#endif 4860484Sobrien 4960484Sobrien/* 5077298Sobrien * XSSO 4.2.1, 6 5160484Sobrien */ 5260484Sobrien 5360484Sobrienint 5460484Sobrienpam_acct_mgmt(pam_handle_t *_pamh, 5560484Sobrien int _flags) 5660484Sobrien OPENPAM_NONNULL((1)); 5760484Sobrien 5860484Sobrienint 5960484Sobrienpam_authenticate(pam_handle_t *_pamh, 6060484Sobrien int _flags) 6160484Sobrien OPENPAM_NONNULL((1)); 6260484Sobrien 6360484Sobrienint 6460484Sobrienpam_chauthtok(pam_handle_t *_pamh, 6560484Sobrien int _flags) 6660484Sobrien OPENPAM_NONNULL((1)); 6760484Sobrien 6860484Sobrienint 6960484Sobrienpam_close_session(pam_handle_t *_pamh, 7060484Sobrien int _flags) 7160484Sobrien OPENPAM_NONNULL((1)); 7260484Sobrien 7360484Sobrienint 7460484Sobrienpam_end(pam_handle_t *_pamh, 7560484Sobrien int _status); 7660484Sobrien 7760484Sobrienint 7860484Sobrienpam_get_data(const pam_handle_t *_pamh, 7960484Sobrien const char *_module_data_name, 8060484Sobrien const void **_data) 8160484Sobrien OPENPAM_NONNULL((1,2,3)); 8260484Sobrien 8360484Sobrienint 8460484Sobrienpam_get_item(const pam_handle_t *_pamh, 8560484Sobrien int _item_type, 8660484Sobrien const void **_item) 8760484Sobrien OPENPAM_NONNULL((1,3)); 8860484Sobrien 8960484Sobrienint 9060484Sobrienpam_get_user(pam_handle_t *_pamh, 9160484Sobrien const char **_user, 9260484Sobrien const char *_prompt) 9360484Sobrien OPENPAM_NONNULL((1,2)); 9460484Sobrien 9560484Sobrienconst char * 9677298Sobrienpam_getenv(pam_handle_t *_pamh, 9760484Sobrien const char *_name) 9860484Sobrien OPENPAM_NONNULL((1,2)); 9977298Sobrien 10060484Sobrienchar ** 10160484Sobrienpam_getenvlist(pam_handle_t *_pamh) 10260484Sobrien OPENPAM_NONNULL((1)); 10360484Sobrien 10460484Sobrienint 10560484Sobrienpam_open_session(pam_handle_t *_pamh, 10660484Sobrien int _flags) 10760484Sobrien OPENPAM_NONNULL((1)); 10860484Sobrien 10960484Sobrienint 11060484Sobrienpam_putenv(pam_handle_t *_pamh, 11160484Sobrien const char *_namevalue) 11260484Sobrien OPENPAM_NONNULL((1,2)); 11360484Sobrien 11460484Sobrienint 11560484Sobrienpam_set_data(pam_handle_t *_pamh, 11660484Sobrien const char *_module_data_name, 11760484Sobrien void *_data, 11860484Sobrien void (*_cleanup)(pam_handle_t *_pamh, 11960484Sobrien void *_data, 12060484Sobrien int _pam_end_status)) 12160484Sobrien OPENPAM_NONNULL((1,2)); 12260484Sobrien 12377298Sobrienint 12460484Sobrienpam_set_item(pam_handle_t *_pamh, 12560484Sobrien int _item_type, 12660484Sobrien const void *_item) 12760484Sobrien OPENPAM_NONNULL((1)); 12860484Sobrien 12960484Sobrienint 13060484Sobrienpam_setcred(pam_handle_t *_pamh, 13177298Sobrien int _flags) 13260484Sobrien OPENPAM_NONNULL((1)); 13360484Sobrien 13460484Sobrienint 13560484Sobrienpam_start(const char *_service, 13660484Sobrien const char *_user, 13760484Sobrien const struct pam_conv *_pam_conv, 13860484Sobrien pam_handle_t **_pamh) 13977298Sobrien OPENPAM_NONNULL((4)); 14077298Sobrien 14177298Sobrienconst char * 14260484Sobrienpam_strerror(const pam_handle_t *_pamh, 14360484Sobrien int _error_number); 14460484Sobrien 14560484Sobrien/* 146 * Single Sign-On extensions 147 */ 148#if 0 149int 150pam_authenticate_secondary(pam_handle_t *_pamh, 151 char *_target_username, 152 char *_target_module_type, 153 char *_target_authn_domain, 154 char *_target_supp_data, 155 char *_target_module_authtok, 156 int _flags); 157 158int 159pam_get_mapped_authtok(pam_handle_t *_pamh, 160 const char *_target_module_username, 161 const char *_target_module_type, 162 const char *_target_authn_domain, 163 size_t *_target_authtok_len, 164 unsigned char **_target_module_authtok); 165 166int 167pam_get_mapped_username(pam_handle_t *_pamh, 168 const char *_src_username, 169 const char *_src_module_type, 170 const char *_src_authn_domain, 171 const char *_target_module_type, 172 const char *_target_authn_domain, 173 char **_target_module_username); 174 175int 176pam_set_mapped_authtok(pam_handle_t *_pamh, 177 const char *_target_module_username, 178 size_t _target_authtok_len, 179 unsigned char *_target_module_authtok, 180 const char *_target_module_type, 181 const char *_target_authn_domain); 182 183int 184pam_set_mapped_username(pam_handle_t *_pamh, 185 char *_src_username, 186 char *_src_module_type, 187 char *_src_authn_domain, 188 char *_target_module_username, 189 char *_target_module_type, 190 char *_target_authn_domain); 191#endif /* 0 */ 192 193#ifdef __cplusplus 194} 195#endif 196 197#endif /* !SECURITY_PAM_APPL_H_INCLUDED */ 198