pam_modules.h revision 115619
191094Sdes/*- 2115619Sdes * Copyright (c) 2002-2003 Networks Associates Technology, Inc. 391094Sdes * All rights reserved. 491094Sdes * 591094Sdes * This software was developed for the FreeBSD Project by ThinkSec AS and 699158Sdes * Network Associates Laboratories, the Security Research Division of 799158Sdes * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 899158Sdes * ("CBOSS"), as part of the DARPA CHATS research program. 991094Sdes * 1091094Sdes * Redistribution and use in source and binary forms, with or without 1191094Sdes * modification, are permitted provided that the following conditions 1291094Sdes * are met: 1391094Sdes * 1. Redistributions of source code must retain the above copyright 1491094Sdes * notice, this list of conditions and the following disclaimer. 1591094Sdes * 2. Redistributions in binary form must reproduce the above copyright 1691094Sdes * notice, this list of conditions and the following disclaimer in the 1791094Sdes * documentation and/or other materials provided with the distribution. 1891094Sdes * 3. The name of the author may not be used to endorse or promote 1991094Sdes * products derived from this software without specific prior written 2091094Sdes * permission. 2191094Sdes * 2291094Sdes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 2391094Sdes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2491094Sdes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2591094Sdes * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 2691094Sdes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2791094Sdes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2891094Sdes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2991094Sdes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3091094Sdes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3191094Sdes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3291094Sdes * SUCH DAMAGE. 3391094Sdes * 34115619Sdes * $P4: //depot/projects/openpam/include/security/pam_modules.h#9 $ 3591094Sdes */ 3691094Sdes 3791094Sdes#ifndef _PAM_MODULES_H_INCLUDED 3891094Sdes#define _PAM_MODULES_H_INCLUDED 3991094Sdes 4091094Sdes#include <security/pam_types.h> 4191094Sdes#include <security/pam_constants.h> 4291094Sdes#include <security/openpam.h> 4391094Sdes 4491094Sdes#ifdef __cplusplus 4591094Sdesextern "C" { 4691094Sdes#endif 4791094Sdes 4891094Sdes/* 4991094Sdes * XSSO 4.2.2, 6 5091094Sdes */ 5191094Sdes 5294532Sdes#if defined(PAM_SM_ACCOUNT) 5391094SdesPAM_EXTERN int 5491094Sdespam_sm_acct_mgmt(pam_handle_t *_pamh, 5591094Sdes int _flags, 5691094Sdes int _argc, 5791094Sdes const char **_argv); 5894532Sdes#endif 5991094Sdes 6094532Sdes#if defined(PAM_SM_AUTH) 6191094SdesPAM_EXTERN int 6291094Sdespam_sm_authenticate(pam_handle_t *_pamh, 6391094Sdes int _flags, 6491094Sdes int _argc, 6591094Sdes const char **_argv); 6694532Sdes#endif 6791094Sdes 6894532Sdes#if defined(PAM_SM_PASSWORD) 6991094SdesPAM_EXTERN int 7091094Sdespam_sm_chauthtok(pam_handle_t *_pamh, 7191094Sdes int _flags, 7291094Sdes int _argc, 7391094Sdes const char **_argv); 7494532Sdes#endif 7591094Sdes 7694532Sdes#if defined(PAM_SM_SESSION) 7791094SdesPAM_EXTERN int 7891094Sdespam_sm_close_session(pam_handle_t *_pamh, 7991094Sdes int _flags, 8091094Sdes int _args, 8191094Sdes const char **_argv); 8294532Sdes#endif 8391094Sdes 8494532Sdes#if defined(PAM_SM_SESSION) 8591094SdesPAM_EXTERN int 8691094Sdespam_sm_open_session(pam_handle_t *_pamh, 8791094Sdes int _flags, 8891094Sdes int _argc, 8991094Sdes const char **_argv); 9094532Sdes#endif 9191094Sdes 9294532Sdes#if defined(PAM_SM_AUTH) 9391094SdesPAM_EXTERN int 9491094Sdespam_sm_setcred(pam_handle_t *_pamh, 9591094Sdes int _flags, 9691094Sdes int _argc, 9791094Sdes const char **_argv); 9894532Sdes#endif 9991094Sdes 10091094Sdes/* 10191094Sdes * Single Sign-On extensions 10291094Sdes */ 10391094Sdes#if 0 10491094SdesPAM_EXTERN int 10591094Sdespam_sm_authenticate_secondary(pam_handle_t *_pamh, 10691094Sdes char *_target_username, 10791094Sdes char *_target_module_type, 10891094Sdes char *_target_authn_domain, 10991094Sdes char *_target_supp_data, 11091094Sdes unsigned char *_target_module_authtok, 11191094Sdes int _flags, 11291094Sdes int _argc, 11391094Sdes const char **_argv); 11491094Sdes 11591094SdesPAM_EXTERN int 11691094Sdespam_sm_get_mapped_authtok(pam_handle_t *_pamh, 11791094Sdes char *_target_module_username, 11891094Sdes char *_target_module_type, 11991094Sdes char *_target_authn_domain, 12091094Sdes size_t *_target_authtok_len, 12191094Sdes unsigned char **_target_module_authtok, 12291094Sdes int _argc, 12391094Sdes char *_argv); 12491094Sdes 12591094SdesPAM_EXTERN int 12691094Sdespam_sm_get_mapped_username(pam_handle_t *_pamh, 12791094Sdes char *_src_username, 12891094Sdes char *_src_module_type, 12991094Sdes char *_src_authn_domain, 13091094Sdes char *_target_module_type, 13191094Sdes char *_target_authn_domain, 13291094Sdes char **_target_module_username, 13391094Sdes int _argc, 13491094Sdes const char **_argv); 13591094Sdes 13691094SdesPAM_EXTERN int 13791094Sdespam_sm_set_mapped_authtok(pam_handle_t *_pamh, 13891094Sdes char *_target_module_username, 13991094Sdes size_t _target_authtok_len, 14091094Sdes unsigned char *_target_module_authtok, 14191094Sdes char *_target_module_type, 14291094Sdes char *_target_authn_domain, 14391094Sdes int _argc, 14491094Sdes const char *_argv); 14591094Sdes 14691094SdesPAM_EXTERN int 14791094Sdespam_sm_set_mapped_username(pam_handle_t *_pamh, 14891094Sdes char *_target_module_username, 14991094Sdes char *_target_module_type, 15091094Sdes char *_target_authn_domain, 15191094Sdes int _argc, 15291094Sdes const char **_argv); 15391094Sdes 15491094Sdes#endif /* 0 */ 15591094Sdes 15691094Sdes#ifdef __cplusplus 15791094Sdes} 15891094Sdes#endif 15991094Sdes 16091094Sdes#endif 161