15c1eca55SDag-Erling Smørgrav /*- 231c521e9SDag-Erling Smørgrav * Copyright (c) 2002-2003 Networks Associates Technology, Inc. 37f106882SDag-Erling Smørgrav * Copyright (c) 2004-2011 Dag-Erling Smørgrav 45c1eca55SDag-Erling Smørgrav * All rights reserved. 55c1eca55SDag-Erling Smørgrav * 65c1eca55SDag-Erling Smørgrav * This software was developed for the FreeBSD Project by ThinkSec AS and 7ee02aaa9SDag-Erling Smørgrav * Network Associates Laboratories, the Security Research Division of 8ee02aaa9SDag-Erling Smørgrav * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 9ee02aaa9SDag-Erling Smørgrav * ("CBOSS"), as part of the DARPA CHATS research program. 105c1eca55SDag-Erling Smørgrav * 115c1eca55SDag-Erling Smørgrav * Redistribution and use in source and binary forms, with or without 125c1eca55SDag-Erling Smørgrav * modification, are permitted provided that the following conditions 135c1eca55SDag-Erling Smørgrav * are met: 145c1eca55SDag-Erling Smørgrav * 1. Redistributions of source code must retain the above copyright 155c1eca55SDag-Erling Smørgrav * notice, this list of conditions and the following disclaimer. 165c1eca55SDag-Erling Smørgrav * 2. Redistributions in binary form must reproduce the above copyright 175c1eca55SDag-Erling Smørgrav * notice, this list of conditions and the following disclaimer in the 185c1eca55SDag-Erling Smørgrav * documentation and/or other materials provided with the distribution. 195c1eca55SDag-Erling Smørgrav * 3. The name of the author may not be used to endorse or promote 205c1eca55SDag-Erling Smørgrav * products derived from this software without specific prior written 215c1eca55SDag-Erling Smørgrav * permission. 225c1eca55SDag-Erling Smørgrav * 235c1eca55SDag-Erling Smørgrav * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 245c1eca55SDag-Erling Smørgrav * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 255c1eca55SDag-Erling Smørgrav * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 265c1eca55SDag-Erling Smørgrav * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 275c1eca55SDag-Erling Smørgrav * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 285c1eca55SDag-Erling Smørgrav * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 295c1eca55SDag-Erling Smørgrav * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 305c1eca55SDag-Erling Smørgrav * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 315c1eca55SDag-Erling Smørgrav * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 325c1eca55SDag-Erling Smørgrav * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 335c1eca55SDag-Erling Smørgrav * SUCH DAMAGE. 345c1eca55SDag-Erling Smørgrav * 357f106882SDag-Erling Smørgrav * $Id: pam_modules.h 437 2011-09-13 12:00:13Z des $ 365c1eca55SDag-Erling Smørgrav */ 375c1eca55SDag-Erling Smørgrav 38fe980754SDag-Erling Smørgrav #ifndef SECURITY_PAM_MODULES_H_INCLUDED 39fe980754SDag-Erling Smørgrav #define SECURITY_PAM_MODULES_H_INCLUDED 405c1eca55SDag-Erling Smørgrav 415c1eca55SDag-Erling Smørgrav #include <security/pam_types.h> 425c1eca55SDag-Erling Smørgrav #include <security/pam_constants.h> 435c1eca55SDag-Erling Smørgrav #include <security/openpam.h> 445c1eca55SDag-Erling Smørgrav 455c1eca55SDag-Erling Smørgrav #ifdef __cplusplus 465c1eca55SDag-Erling Smørgrav extern "C" { 475c1eca55SDag-Erling Smørgrav #endif 485c1eca55SDag-Erling Smørgrav 495c1eca55SDag-Erling Smørgrav /* 505c1eca55SDag-Erling Smørgrav * XSSO 4.2.2, 6 515c1eca55SDag-Erling Smørgrav */ 525c1eca55SDag-Erling Smørgrav 53b825a3acSDag-Erling Smørgrav #if defined(PAM_SM_ACCOUNT) 545c1eca55SDag-Erling Smørgrav PAM_EXTERN int 555c1eca55SDag-Erling Smørgrav pam_sm_acct_mgmt(pam_handle_t *_pamh, 565c1eca55SDag-Erling Smørgrav int _flags, 575c1eca55SDag-Erling Smørgrav int _argc, 585c1eca55SDag-Erling Smørgrav const char **_argv); 59b825a3acSDag-Erling Smørgrav #endif 605c1eca55SDag-Erling Smørgrav 61b825a3acSDag-Erling Smørgrav #if defined(PAM_SM_AUTH) 625c1eca55SDag-Erling Smørgrav PAM_EXTERN int 635c1eca55SDag-Erling Smørgrav pam_sm_authenticate(pam_handle_t *_pamh, 645c1eca55SDag-Erling Smørgrav int _flags, 655c1eca55SDag-Erling Smørgrav int _argc, 665c1eca55SDag-Erling Smørgrav const char **_argv); 67b825a3acSDag-Erling Smørgrav #endif 685c1eca55SDag-Erling Smørgrav 69b825a3acSDag-Erling Smørgrav #if defined(PAM_SM_PASSWORD) 705c1eca55SDag-Erling Smørgrav PAM_EXTERN int 715c1eca55SDag-Erling Smørgrav pam_sm_chauthtok(pam_handle_t *_pamh, 725c1eca55SDag-Erling Smørgrav int _flags, 735c1eca55SDag-Erling Smørgrav int _argc, 745c1eca55SDag-Erling Smørgrav const char **_argv); 75b825a3acSDag-Erling Smørgrav #endif 765c1eca55SDag-Erling Smørgrav 77b825a3acSDag-Erling Smørgrav #if defined(PAM_SM_SESSION) 785c1eca55SDag-Erling Smørgrav PAM_EXTERN int 795c1eca55SDag-Erling Smørgrav pam_sm_close_session(pam_handle_t *_pamh, 805c1eca55SDag-Erling Smørgrav int _flags, 815c1eca55SDag-Erling Smørgrav int _args, 825c1eca55SDag-Erling Smørgrav const char **_argv); 83b825a3acSDag-Erling Smørgrav #endif 845c1eca55SDag-Erling Smørgrav 85b825a3acSDag-Erling Smørgrav #if defined(PAM_SM_SESSION) 865c1eca55SDag-Erling Smørgrav PAM_EXTERN int 875c1eca55SDag-Erling Smørgrav pam_sm_open_session(pam_handle_t *_pamh, 885c1eca55SDag-Erling Smørgrav int _flags, 895c1eca55SDag-Erling Smørgrav int _argc, 905c1eca55SDag-Erling Smørgrav const char **_argv); 91b825a3acSDag-Erling Smørgrav #endif 925c1eca55SDag-Erling Smørgrav 93b825a3acSDag-Erling Smørgrav #if defined(PAM_SM_AUTH) 945c1eca55SDag-Erling Smørgrav PAM_EXTERN int 955c1eca55SDag-Erling Smørgrav pam_sm_setcred(pam_handle_t *_pamh, 965c1eca55SDag-Erling Smørgrav int _flags, 975c1eca55SDag-Erling Smørgrav int _argc, 985c1eca55SDag-Erling Smørgrav const char **_argv); 99b825a3acSDag-Erling Smørgrav #endif 1005c1eca55SDag-Erling Smørgrav 1015c1eca55SDag-Erling Smørgrav /* 1025c1eca55SDag-Erling Smørgrav * Single Sign-On extensions 1035c1eca55SDag-Erling Smørgrav */ 1045c1eca55SDag-Erling Smørgrav #if 0 1055c1eca55SDag-Erling Smørgrav PAM_EXTERN int 1065c1eca55SDag-Erling Smørgrav pam_sm_authenticate_secondary(pam_handle_t *_pamh, 1075c1eca55SDag-Erling Smørgrav char *_target_username, 1085c1eca55SDag-Erling Smørgrav char *_target_module_type, 1095c1eca55SDag-Erling Smørgrav char *_target_authn_domain, 1105c1eca55SDag-Erling Smørgrav char *_target_supp_data, 1115c1eca55SDag-Erling Smørgrav unsigned char *_target_module_authtok, 1125c1eca55SDag-Erling Smørgrav int _flags, 1135c1eca55SDag-Erling Smørgrav int _argc, 1145c1eca55SDag-Erling Smørgrav const char **_argv); 1155c1eca55SDag-Erling Smørgrav 1165c1eca55SDag-Erling Smørgrav PAM_EXTERN int 1175c1eca55SDag-Erling Smørgrav pam_sm_get_mapped_authtok(pam_handle_t *_pamh, 1185c1eca55SDag-Erling Smørgrav char *_target_module_username, 1195c1eca55SDag-Erling Smørgrav char *_target_module_type, 1205c1eca55SDag-Erling Smørgrav char *_target_authn_domain, 1215c1eca55SDag-Erling Smørgrav size_t *_target_authtok_len, 1225c1eca55SDag-Erling Smørgrav unsigned char **_target_module_authtok, 1235c1eca55SDag-Erling Smørgrav int _argc, 1245c1eca55SDag-Erling Smørgrav char *_argv); 1255c1eca55SDag-Erling Smørgrav 1265c1eca55SDag-Erling Smørgrav PAM_EXTERN int 1275c1eca55SDag-Erling Smørgrav pam_sm_get_mapped_username(pam_handle_t *_pamh, 1285c1eca55SDag-Erling Smørgrav char *_src_username, 1295c1eca55SDag-Erling Smørgrav char *_src_module_type, 1305c1eca55SDag-Erling Smørgrav char *_src_authn_domain, 1315c1eca55SDag-Erling Smørgrav char *_target_module_type, 1325c1eca55SDag-Erling Smørgrav char *_target_authn_domain, 1335c1eca55SDag-Erling Smørgrav char **_target_module_username, 1345c1eca55SDag-Erling Smørgrav int _argc, 1355c1eca55SDag-Erling Smørgrav const char **_argv); 1365c1eca55SDag-Erling Smørgrav 1375c1eca55SDag-Erling Smørgrav PAM_EXTERN int 1385c1eca55SDag-Erling Smørgrav pam_sm_set_mapped_authtok(pam_handle_t *_pamh, 1395c1eca55SDag-Erling Smørgrav char *_target_module_username, 1405c1eca55SDag-Erling Smørgrav size_t _target_authtok_len, 1415c1eca55SDag-Erling Smørgrav unsigned char *_target_module_authtok, 1425c1eca55SDag-Erling Smørgrav char *_target_module_type, 1435c1eca55SDag-Erling Smørgrav char *_target_authn_domain, 1445c1eca55SDag-Erling Smørgrav int _argc, 1455c1eca55SDag-Erling Smørgrav const char *_argv); 1465c1eca55SDag-Erling Smørgrav 1475c1eca55SDag-Erling Smørgrav PAM_EXTERN int 1485c1eca55SDag-Erling Smørgrav pam_sm_set_mapped_username(pam_handle_t *_pamh, 1495c1eca55SDag-Erling Smørgrav char *_target_module_username, 1505c1eca55SDag-Erling Smørgrav char *_target_module_type, 1515c1eca55SDag-Erling Smørgrav char *_target_authn_domain, 1525c1eca55SDag-Erling Smørgrav int _argc, 1535c1eca55SDag-Erling Smørgrav const char **_argv); 1545c1eca55SDag-Erling Smørgrav 1555c1eca55SDag-Erling Smørgrav #endif /* 0 */ 1565c1eca55SDag-Erling Smørgrav 1575c1eca55SDag-Erling Smørgrav #ifdef __cplusplus 1585c1eca55SDag-Erling Smørgrav } 1595c1eca55SDag-Erling Smørgrav #endif 1605c1eca55SDag-Erling Smørgrav 161fe980754SDag-Erling Smørgrav #endif /* !SECURITY_PAM_MODULES_H_INCLUDED */ 162