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 *
35255376Sdes * $Id: pam_constants.h 648 2013-03-05 17:54:27Z des $
3691094Sdes */
3791094Sdes
38174832Sdes#ifndef SECURITY_PAM_CONSTANTS_H_INCLUDED
39174832Sdes#define SECURITY_PAM_CONSTANTS_H_INCLUDED
4091094Sdes
4194670Sdes#include <security/openpam_version.h>
4294670Sdes
4391094Sdes#ifdef __cplusplus
4491094Sdesextern "C" {
4591094Sdes#endif
4691094Sdes
4791094Sdes/*
4891094Sdes * XSSO 5.2
4991094Sdes */
5091094Sdesenum {
5191094Sdes	PAM_SUCCESS			=   0,
5291094Sdes	PAM_OPEN_ERR			=   1,
5391094Sdes	PAM_SYMBOL_ERR			=   2,
5491094Sdes	PAM_SERVICE_ERR			=   3,
5591094Sdes	PAM_SYSTEM_ERR			=   4,
5691094Sdes	PAM_BUF_ERR			=   5,
5791094Sdes	PAM_CONV_ERR			=   6,
5891094Sdes	PAM_PERM_DENIED			=   7,
5991094Sdes	PAM_MAXTRIES			=   8,
6091094Sdes	PAM_AUTH_ERR			=   9,
6191094Sdes	PAM_NEW_AUTHTOK_REQD		=  10,
6291094Sdes	PAM_CRED_INSUFFICIENT		=  11,
6391094Sdes	PAM_AUTHINFO_UNAVAIL		=  12,
6491094Sdes	PAM_USER_UNKNOWN		=  13,
6591094Sdes	PAM_CRED_UNAVAIL		=  14,
6691094Sdes	PAM_CRED_EXPIRED		=  15,
6791094Sdes	PAM_CRED_ERR			=  16,
6891094Sdes	PAM_ACCT_EXPIRED		=  17,
6991094Sdes	PAM_AUTHTOK_EXPIRED		=  18,
7091094Sdes	PAM_SESSION_ERR			=  19,
7191094Sdes	PAM_AUTHTOK_ERR			=  20,
7291094Sdes	PAM_AUTHTOK_RECOVERY_ERR	=  21,
7391094Sdes	PAM_AUTHTOK_LOCK_BUSY		=  22,
7491094Sdes	PAM_AUTHTOK_DISABLE_AGING	=  23,
7591094Sdes	PAM_NO_MODULE_DATA		=  24,
7691094Sdes	PAM_IGNORE			=  25,
7791094Sdes	PAM_ABORT			=  26,
7891094Sdes	PAM_TRY_AGAIN			=  27,
7991094Sdes	PAM_MODULE_UNKNOWN		=  28,
80107937Sdes	PAM_DOMAIN_UNKNOWN		=  29,
81107937Sdes	PAM_NUM_ERRORS					/* OpenPAM extension */
8291094Sdes};
8391094Sdes
8491094Sdes/*
8591094Sdes * XSSO 5.3
8691094Sdes */
8791094Sdesenum {
8891094Sdes	PAM_PROMPT_ECHO_OFF		=   1,
8991094Sdes	PAM_PROMPT_ECHO_ON		=   2,
9091094Sdes	PAM_ERROR_MSG			=   3,
9191094Sdes	PAM_TEXT_INFO			=   4,
9291094Sdes	PAM_MAX_NUM_MSG			=  32,
9391094Sdes	PAM_MAX_MSG_SIZE		= 512,
9491094Sdes	PAM_MAX_RESP_SIZE		= 512
9591094Sdes};
9691094Sdes
9791094Sdes/*
9891094Sdes * XSSO 5.4
9991094Sdes */
10091094Sdesenum {
101114536Sdes	/* some compilers promote 0x8000000 to long */
102114536Sdes	PAM_SILENT			= (-0x7fffffff - 1),
10391094Sdes	PAM_DISALLOW_NULL_AUTHTOK	= 0x1,
10491094Sdes	PAM_ESTABLISH_CRED		= 0x1,
10591094Sdes	PAM_DELETE_CRED			= 0x2,
10691799Sdes	PAM_REINITIALIZE_CRED		= 0x4,
10791094Sdes	PAM_REFRESH_CRED		= 0x8,
10891094Sdes	PAM_PRELIM_CHECK		= 0x1,
10991094Sdes	PAM_UPDATE_AUTHTOK		= 0x2,
11091094Sdes	PAM_CHANGE_EXPIRED_AUTHTOK	= 0x4
11191094Sdes};
11291094Sdes
11391094Sdes/*
11491094Sdes * XSSO 5.5
11591094Sdes */
11691094Sdesenum {
11791094Sdes	PAM_SERVICE			=   1,
11891094Sdes	PAM_USER			=   2,
11991094Sdes	PAM_TTY				=   3,
12091094Sdes	PAM_RHOST			=   4,
12191094Sdes	PAM_CONV			=   5,
12291094Sdes	PAM_AUTHTOK			=   6,
12391094Sdes	PAM_OLDAUTHTOK			=   7,
12491094Sdes	PAM_RUSER			=   8,
12591094Sdes	PAM_USER_PROMPT			=   9,
12699160Sdes	PAM_REPOSITORY			=  10,
12799160Sdes	PAM_AUTHTOK_PROMPT		=  11,		/* OpenPAM extension */
12899160Sdes	PAM_OLDAUTHTOK_PROMPT		=  12,		/* OpenPAM extension */
129228692Sdes	PAM_HOST			=  13,		/* OpenPAM extension */
13091100Sdes	PAM_NUM_ITEMS					/* OpenPAM extension */
13191094Sdes};
13291094Sdes
13391094Sdes#ifdef __cplusplus
13491094Sdes}
13591094Sdes#endif
13691094Sdes
137174832Sdes#endif /* !SECURITY_PAM_CONSTANTS_H_INCLUDED */
138