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