xref: /titanic_52/usr/src/lib/libpam/pam_appl.h (revision 38603a2034ae521f26661b0a6239028a83026614)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5bf430c99Sgww  * Common Development and Distribution License (the "License").
6bf430c99Sgww  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
22*38603a20SDarren J Moffat  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate #ifndef _PAM_APPL_H
277c478bd9Sstevel@tonic-gate #define	_PAM_APPL_H
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate #include <sys/types.h>
307c478bd9Sstevel@tonic-gate 
317c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
327c478bd9Sstevel@tonic-gate extern "C" {
337c478bd9Sstevel@tonic-gate #endif
347c478bd9Sstevel@tonic-gate 
357c478bd9Sstevel@tonic-gate /* Generic PAM errors */
367c478bd9Sstevel@tonic-gate #define	PAM_SUCCESS		0	/* Normal function return */
377c478bd9Sstevel@tonic-gate #define	PAM_OPEN_ERR		1	/* Dlopen failure */
387c478bd9Sstevel@tonic-gate #define	PAM_SYMBOL_ERR		2	/* Symbol not found */
397c478bd9Sstevel@tonic-gate #define	PAM_SERVICE_ERR		3	/* Error in underlying service module */
407c478bd9Sstevel@tonic-gate #define	PAM_SYSTEM_ERR		4	/* System error */
417c478bd9Sstevel@tonic-gate #define	PAM_BUF_ERR		5	/* Memory buffer error */
427c478bd9Sstevel@tonic-gate #define	PAM_CONV_ERR		6	/* Conversation failure */
437c478bd9Sstevel@tonic-gate #define	PAM_PERM_DENIED		7	/* Permission denied */
447c478bd9Sstevel@tonic-gate 
457c478bd9Sstevel@tonic-gate /* Errors returned by pam_authenticate, pam_acct_mgmt(), and pam_setcred() */
467c478bd9Sstevel@tonic-gate #define	PAM_MAXTRIES		8	/* Maximum number of tries exceeded */
477c478bd9Sstevel@tonic-gate #define	PAM_AUTH_ERR		9	/* Authentication failure */
487c478bd9Sstevel@tonic-gate #define	PAM_NEW_AUTHTOK_REQD	10	/* Get new auth token from the user */
497c478bd9Sstevel@tonic-gate #define	PAM_CRED_INSUFFICIENT	11	/* can not access auth data b/c */
507c478bd9Sstevel@tonic-gate 					/* of insufficient credentials  */
517c478bd9Sstevel@tonic-gate #define	PAM_AUTHINFO_UNAVAIL	12	/* Can not retrieve auth information */
527c478bd9Sstevel@tonic-gate #define	PAM_USER_UNKNOWN	13	/* No account present for user */
537c478bd9Sstevel@tonic-gate 
547c478bd9Sstevel@tonic-gate /* Errors returned by pam_setcred() */
557c478bd9Sstevel@tonic-gate #define	PAM_CRED_UNAVAIL	14	/* can not retrieve user credentials */
567c478bd9Sstevel@tonic-gate #define	PAM_CRED_EXPIRED	15	/* user credentials expired */
577c478bd9Sstevel@tonic-gate #define	PAM_CRED_ERR		16	/* failure setting user credentials */
587c478bd9Sstevel@tonic-gate 
597c478bd9Sstevel@tonic-gate /* Errors returned by pam_acct_mgmt() */
607c478bd9Sstevel@tonic-gate #define	PAM_ACCT_EXPIRED	17	/* user account has expired */
617c478bd9Sstevel@tonic-gate #define	PAM_AUTHTOK_EXPIRED 	18	/* Password expired and no longer */
627c478bd9Sstevel@tonic-gate 					/* usable */
637c478bd9Sstevel@tonic-gate 
647c478bd9Sstevel@tonic-gate /* Errors returned by pam_open/close_session() */
657c478bd9Sstevel@tonic-gate #define	PAM_SESSION_ERR		19	/* can not make/remove entry for */
667c478bd9Sstevel@tonic-gate 					/* specified session */
677c478bd9Sstevel@tonic-gate 
687c478bd9Sstevel@tonic-gate /* Errors returned by pam_chauthtok() */
697c478bd9Sstevel@tonic-gate #define	PAM_AUTHTOK_ERR		  20	/* Authentication token */
707c478bd9Sstevel@tonic-gate 					/*   manipulation error */
717c478bd9Sstevel@tonic-gate #define	PAM_AUTHTOK_RECOVERY_ERR  21	/* Old authentication token */
727c478bd9Sstevel@tonic-gate 					/*   cannot be recovered */
737c478bd9Sstevel@tonic-gate #define	PAM_AUTHTOK_LOCK_BUSY	  22	/* Authentication token */
747c478bd9Sstevel@tonic-gate 					/*   lock busy */
757c478bd9Sstevel@tonic-gate #define	PAM_AUTHTOK_DISABLE_AGING 23	/* Authentication token aging */
767c478bd9Sstevel@tonic-gate 					/*   is disabled */
777c478bd9Sstevel@tonic-gate 
787c478bd9Sstevel@tonic-gate /* Errors returned by pam_get_data */
797c478bd9Sstevel@tonic-gate #define	PAM_NO_MODULE_DATA	24	/* module data not found */
807c478bd9Sstevel@tonic-gate 
817c478bd9Sstevel@tonic-gate /* Errors returned by modules */
827c478bd9Sstevel@tonic-gate #define	PAM_IGNORE		25	/* ignore module */
837c478bd9Sstevel@tonic-gate 
847c478bd9Sstevel@tonic-gate #define	PAM_ABORT		26	/* General PAM failure */
857c478bd9Sstevel@tonic-gate #define	PAM_TRY_AGAIN		27	/* Unable to update password */
867c478bd9Sstevel@tonic-gate 					/* Try again another time */
877c478bd9Sstevel@tonic-gate #define	PAM_TOTAL_ERRNUM	28
887c478bd9Sstevel@tonic-gate 
897c478bd9Sstevel@tonic-gate /*
907c478bd9Sstevel@tonic-gate  * structure pam_message is used to pass prompt, error message,
917c478bd9Sstevel@tonic-gate  * or any text information from scheme to application/user.
927c478bd9Sstevel@tonic-gate  */
937c478bd9Sstevel@tonic-gate 
947c478bd9Sstevel@tonic-gate struct pam_message {
957c478bd9Sstevel@tonic-gate 	int msg_style;		/* Msg_style - see below */
967c478bd9Sstevel@tonic-gate 	char *msg; 		/* Message string */
977c478bd9Sstevel@tonic-gate };
987c478bd9Sstevel@tonic-gate 
997c478bd9Sstevel@tonic-gate /*
1007c478bd9Sstevel@tonic-gate  * msg_style defines the interaction style between the
1017c478bd9Sstevel@tonic-gate  * scheme and the application.
1027c478bd9Sstevel@tonic-gate  */
1037c478bd9Sstevel@tonic-gate #define	PAM_PROMPT_ECHO_OFF	1	/* Echo off when getting response */
1047c478bd9Sstevel@tonic-gate #define	PAM_PROMPT_ECHO_ON	2 	/* Echo on when getting response */
1057c478bd9Sstevel@tonic-gate #define	PAM_ERROR_MSG		3	/* Error message */
1067c478bd9Sstevel@tonic-gate #define	PAM_TEXT_INFO		4	/* Textual information */
1077c478bd9Sstevel@tonic-gate 
1087c478bd9Sstevel@tonic-gate /*
1097c478bd9Sstevel@tonic-gate  * max # of messages passed to the application through the
1107c478bd9Sstevel@tonic-gate  * conversation function call
1117c478bd9Sstevel@tonic-gate  */
1127c478bd9Sstevel@tonic-gate #define	PAM_MAX_NUM_MSG	32
1137c478bd9Sstevel@tonic-gate 
1147c478bd9Sstevel@tonic-gate /*
1157c478bd9Sstevel@tonic-gate  * max size (in chars) of each messages passed to the application
1167c478bd9Sstevel@tonic-gate  * through the conversation function call
1177c478bd9Sstevel@tonic-gate  */
1187c478bd9Sstevel@tonic-gate #define	PAM_MAX_MSG_SIZE	512
1197c478bd9Sstevel@tonic-gate 
1207c478bd9Sstevel@tonic-gate /*
1217c478bd9Sstevel@tonic-gate  * max size (in chars) of each response passed from the application
1227c478bd9Sstevel@tonic-gate  * through the conversation function call
1237c478bd9Sstevel@tonic-gate  */
1247c478bd9Sstevel@tonic-gate #define	PAM_MAX_RESP_SIZE	512
1257c478bd9Sstevel@tonic-gate 
1267c478bd9Sstevel@tonic-gate /*
1277c478bd9Sstevel@tonic-gate  * structure pam_response is used by the scheme to get the user's
1287c478bd9Sstevel@tonic-gate  * response back from the application/user.
1297c478bd9Sstevel@tonic-gate  */
1307c478bd9Sstevel@tonic-gate 
1317c478bd9Sstevel@tonic-gate struct pam_response {
1327c478bd9Sstevel@tonic-gate 	char *resp;		/* Response string */
1337c478bd9Sstevel@tonic-gate 	int resp_retcode;	/* Return code - for future use */
1347c478bd9Sstevel@tonic-gate };
1357c478bd9Sstevel@tonic-gate 
1367c478bd9Sstevel@tonic-gate /*
1377c478bd9Sstevel@tonic-gate  * structure pam_conv is used by authentication applications for passing
1387c478bd9Sstevel@tonic-gate  * call back function pointers and application data pointers to the scheme
1397c478bd9Sstevel@tonic-gate  */
1407c478bd9Sstevel@tonic-gate struct pam_conv {
1417c478bd9Sstevel@tonic-gate 	int (*conv)(int, struct pam_message **,
1427c478bd9Sstevel@tonic-gate 	    struct pam_response **, void *);
1437c478bd9Sstevel@tonic-gate 	void *appdata_ptr;		/* Application data ptr */
1447c478bd9Sstevel@tonic-gate };
1457c478bd9Sstevel@tonic-gate 
1467c478bd9Sstevel@tonic-gate /* the pam handle */
1477c478bd9Sstevel@tonic-gate typedef struct pam_handle pam_handle_t;
1487c478bd9Sstevel@tonic-gate 
1497c478bd9Sstevel@tonic-gate /*
1507c478bd9Sstevel@tonic-gate  * pam_start() is called to initiate an authentication exchange
1517c478bd9Sstevel@tonic-gate  * with PAM.
1527c478bd9Sstevel@tonic-gate  */
1537c478bd9Sstevel@tonic-gate extern int
1547c478bd9Sstevel@tonic-gate pam_start(
1557c478bd9Sstevel@tonic-gate 	const char *service_name,		/* Service Name */
1567c478bd9Sstevel@tonic-gate 	const char *user,			/* User Name */
1577c478bd9Sstevel@tonic-gate 	const struct pam_conv *pam_conv,	/* Conversation structure */
1587c478bd9Sstevel@tonic-gate 	pam_handle_t **pamh		/* Address to store handle */
1597c478bd9Sstevel@tonic-gate );
1607c478bd9Sstevel@tonic-gate 
1617c478bd9Sstevel@tonic-gate /*
1627c478bd9Sstevel@tonic-gate  * pam_end() is called to end an authentication exchange with PAM.
1637c478bd9Sstevel@tonic-gate  */
1647c478bd9Sstevel@tonic-gate extern int
1657c478bd9Sstevel@tonic-gate pam_end(
1667c478bd9Sstevel@tonic-gate 	pam_handle_t *pamh,		/* handle from pam_start() */
1677c478bd9Sstevel@tonic-gate 	int status			/* the final status value that */
1687c478bd9Sstevel@tonic-gate 					/* gets passed to cleanup functions */
1697c478bd9Sstevel@tonic-gate );
1707c478bd9Sstevel@tonic-gate 
1717c478bd9Sstevel@tonic-gate /*
1727c478bd9Sstevel@tonic-gate  * pam_set_item is called to store an object in PAM handle.
1737c478bd9Sstevel@tonic-gate  */
1747c478bd9Sstevel@tonic-gate extern int
1757c478bd9Sstevel@tonic-gate pam_set_item(
1767c478bd9Sstevel@tonic-gate 	pam_handle_t *pamh,		/* PAM handle */
1777c478bd9Sstevel@tonic-gate 	int item_type, 			/* Type of object - see below */
1787c478bd9Sstevel@tonic-gate 	const void *item		/* Address of place to put pointer */
1797c478bd9Sstevel@tonic-gate 					/*   to object */
1807c478bd9Sstevel@tonic-gate );
1817c478bd9Sstevel@tonic-gate 
1827c478bd9Sstevel@tonic-gate /*
1837c478bd9Sstevel@tonic-gate  * pam_get_item is called to retrieve an object from the static data area
1847c478bd9Sstevel@tonic-gate  */
1857c478bd9Sstevel@tonic-gate extern int
1867c478bd9Sstevel@tonic-gate pam_get_item(
1877c478bd9Sstevel@tonic-gate 	const pam_handle_t *pamh, 	/* PAM handle */
1887c478bd9Sstevel@tonic-gate 	int item_type, 			/* Type of object - see below */
1897c478bd9Sstevel@tonic-gate 	void **	item			/* Address of place to put pointer */
1907c478bd9Sstevel@tonic-gate 					/*   to object */
1917c478bd9Sstevel@tonic-gate );
1927c478bd9Sstevel@tonic-gate 
1937c478bd9Sstevel@tonic-gate /* Items supported by pam_[sg]et_item() calls */
1947c478bd9Sstevel@tonic-gate #define	PAM_SERVICE	1		/* The program/service name */
1957c478bd9Sstevel@tonic-gate #define	PAM_USER	2		/* The user name */
1967c478bd9Sstevel@tonic-gate #define	PAM_TTY		3		/* The tty name */
1977c478bd9Sstevel@tonic-gate #define	PAM_RHOST	4		/* The remote host name */
1987c478bd9Sstevel@tonic-gate #define	PAM_CONV	5		/* The conversation structure */
1997c478bd9Sstevel@tonic-gate #define	PAM_AUTHTOK	6		/* The authentication token */
2007c478bd9Sstevel@tonic-gate #define	PAM_OLDAUTHTOK	7		/* Old authentication token */
2017c478bd9Sstevel@tonic-gate #define	PAM_RUSER	8		/* The remote user name */
2027c478bd9Sstevel@tonic-gate #define	PAM_USER_PROMPT	9		/* The user prompt */
2037c478bd9Sstevel@tonic-gate #define	PAM_REPOSITORY	10		/* The repository to be updated */
2047c478bd9Sstevel@tonic-gate #define	PAM_RESOURCE	11		/* Resource management info */
205bf430c99Sgww #define	PAM_AUSER	12		/* The authenticated user name */
2067c478bd9Sstevel@tonic-gate 
2077c478bd9Sstevel@tonic-gate /* pam repository structure */
2087c478bd9Sstevel@tonic-gate 
2097c478bd9Sstevel@tonic-gate struct pam_repository {
2107c478bd9Sstevel@tonic-gate 	char   *type;		/* Repository type, e.g., files, nis, ldap */
2117c478bd9Sstevel@tonic-gate 	void   *scope;		/* Optional scope information */
2127c478bd9Sstevel@tonic-gate 	size_t  scope_len;	/* length of scope inforamtion */
2137c478bd9Sstevel@tonic-gate };
2147c478bd9Sstevel@tonic-gate 
2157c478bd9Sstevel@tonic-gate typedef struct pam_repository pam_repository_t;
2167c478bd9Sstevel@tonic-gate 
2177c478bd9Sstevel@tonic-gate /*
2187c478bd9Sstevel@tonic-gate  * pam_get_user is called to retrieve the user name (PAM_USER). If PAM_USER
2197c478bd9Sstevel@tonic-gate  * is not set then this call will prompt for the user name using the
2207c478bd9Sstevel@tonic-gate  * conversation function. This function should only be used by modules, not
2217c478bd9Sstevel@tonic-gate  * applications.
2227c478bd9Sstevel@tonic-gate  */
2237c478bd9Sstevel@tonic-gate 
2247c478bd9Sstevel@tonic-gate extern int
2257c478bd9Sstevel@tonic-gate pam_get_user(
2267c478bd9Sstevel@tonic-gate 	pam_handle_t *pamh,		/* PAM handle */
2277c478bd9Sstevel@tonic-gate 	char **user, 			/* User Name */
2287c478bd9Sstevel@tonic-gate 	const char *prompt		/* Prompt */
2297c478bd9Sstevel@tonic-gate );
2307c478bd9Sstevel@tonic-gate 
2317c478bd9Sstevel@tonic-gate /*
2327c478bd9Sstevel@tonic-gate  * PAM equivalent to strerror();
2337c478bd9Sstevel@tonic-gate  */
2347c478bd9Sstevel@tonic-gate extern const char *
2357c478bd9Sstevel@tonic-gate pam_strerror(
2367c478bd9Sstevel@tonic-gate 	pam_handle_t *pamh,	/* pam handle */
2377c478bd9Sstevel@tonic-gate 	int errnum		/* error number */
2387c478bd9Sstevel@tonic-gate );
2397c478bd9Sstevel@tonic-gate 
2407c478bd9Sstevel@tonic-gate /* general flag for pam_* functions */
2417c478bd9Sstevel@tonic-gate #define	PAM_SILENT	0x80000000
2427c478bd9Sstevel@tonic-gate 
2437c478bd9Sstevel@tonic-gate /*
2447c478bd9Sstevel@tonic-gate  * pam_authenticate is called to authenticate the current user.
2457c478bd9Sstevel@tonic-gate  */
2467c478bd9Sstevel@tonic-gate extern int
2477c478bd9Sstevel@tonic-gate pam_authenticate(
2487c478bd9Sstevel@tonic-gate 	pam_handle_t *pamh,
2497c478bd9Sstevel@tonic-gate 	int flags
2507c478bd9Sstevel@tonic-gate );
2517c478bd9Sstevel@tonic-gate 
2527c478bd9Sstevel@tonic-gate /*
2537c478bd9Sstevel@tonic-gate  * Flags for pam_authenticate
2547c478bd9Sstevel@tonic-gate  */
2557c478bd9Sstevel@tonic-gate 
2567c478bd9Sstevel@tonic-gate #define	PAM_DISALLOW_NULL_AUTHTOK 0x1	/* The password must be non-null */
2577c478bd9Sstevel@tonic-gate 
2587c478bd9Sstevel@tonic-gate /*
2597c478bd9Sstevel@tonic-gate  * pam_acct_mgmt is called to perform account management processing
2607c478bd9Sstevel@tonic-gate  */
2617c478bd9Sstevel@tonic-gate extern int
2627c478bd9Sstevel@tonic-gate pam_acct_mgmt(
2637c478bd9Sstevel@tonic-gate 	pam_handle_t *pamh,
2647c478bd9Sstevel@tonic-gate 	int flags
2657c478bd9Sstevel@tonic-gate );
2667c478bd9Sstevel@tonic-gate 
2677c478bd9Sstevel@tonic-gate /*
2687c478bd9Sstevel@tonic-gate  * pam_open_session is called to note the initiation of new session in the
2697c478bd9Sstevel@tonic-gate  * appropriate administrative data bases.
2707c478bd9Sstevel@tonic-gate  */
2717c478bd9Sstevel@tonic-gate extern int
2727c478bd9Sstevel@tonic-gate pam_open_session(
2737c478bd9Sstevel@tonic-gate 	pam_handle_t *pamh,
2747c478bd9Sstevel@tonic-gate 	int flags
2757c478bd9Sstevel@tonic-gate );
2767c478bd9Sstevel@tonic-gate 
2777c478bd9Sstevel@tonic-gate /*
2787c478bd9Sstevel@tonic-gate  * pam_close_session records the termination of a session.
2797c478bd9Sstevel@tonic-gate  */
2807c478bd9Sstevel@tonic-gate extern int
2817c478bd9Sstevel@tonic-gate pam_close_session(
2827c478bd9Sstevel@tonic-gate 	pam_handle_t	*pamh,
2837c478bd9Sstevel@tonic-gate 	int		flags
2847c478bd9Sstevel@tonic-gate );
2857c478bd9Sstevel@tonic-gate 
2867c478bd9Sstevel@tonic-gate /* pam_setcred is called to set the credentials of the current user */
2877c478bd9Sstevel@tonic-gate extern int
2887c478bd9Sstevel@tonic-gate pam_setcred(
2897c478bd9Sstevel@tonic-gate 	pam_handle_t *pamh,
2907c478bd9Sstevel@tonic-gate 	int flags
2917c478bd9Sstevel@tonic-gate );
2927c478bd9Sstevel@tonic-gate 
2937c478bd9Sstevel@tonic-gate /* flags for pam_setcred() */
2947c478bd9Sstevel@tonic-gate #define	PAM_ESTABLISH_CRED	0x1	/* set scheme specific user id */
2957c478bd9Sstevel@tonic-gate #define	PAM_DELETE_CRED		0x2	/* unset scheme specific user id */
2967c478bd9Sstevel@tonic-gate #define	PAM_REINITIALIZE_CRED	0x4	/* reinitialize user credentials */
2977c478bd9Sstevel@tonic-gate 					/* (after a password has changed */
2987c478bd9Sstevel@tonic-gate #define	PAM_REFRESH_CRED	0x8	/* extend lifetime of credentials */
2997c478bd9Sstevel@tonic-gate 
3007c478bd9Sstevel@tonic-gate /* pam_chauthtok is called to change authentication token */
3017c478bd9Sstevel@tonic-gate 
3027c478bd9Sstevel@tonic-gate extern int
3037c478bd9Sstevel@tonic-gate pam_chauthtok(
3047c478bd9Sstevel@tonic-gate 	pam_handle_t	*pamh,
3057c478bd9Sstevel@tonic-gate 	int		flags
3067c478bd9Sstevel@tonic-gate );
3077c478bd9Sstevel@tonic-gate 
3087c478bd9Sstevel@tonic-gate /*
3097c478bd9Sstevel@tonic-gate  * Be careful - there are flags defined for pam_sm_chauthtok() in
3107c478bd9Sstevel@tonic-gate  * pam_modules.h also:
3117c478bd9Sstevel@tonic-gate  * PAM_PRELIM_CHECK	0x1
3127c478bd9Sstevel@tonic-gate  * PAM_UPDATE_AUTHTOK	0x2
3137c478bd9Sstevel@tonic-gate  */
3147c478bd9Sstevel@tonic-gate #define	PAM_CHANGE_EXPIRED_AUTHTOK	0x4 /* update expired passwords only */
3157c478bd9Sstevel@tonic-gate #define	PAM_NO_AUTHTOK_CHECK		0x8 /* bypass password strength tests */
3167c478bd9Sstevel@tonic-gate 
3177c478bd9Sstevel@tonic-gate /* pam_putenv is called to add environment variables to the PAM handle */
3187c478bd9Sstevel@tonic-gate 
3197c478bd9Sstevel@tonic-gate extern int
3207c478bd9Sstevel@tonic-gate pam_putenv(
3217c478bd9Sstevel@tonic-gate 	pam_handle_t	*pamh,
3227c478bd9Sstevel@tonic-gate 	const char	*name_value
3237c478bd9Sstevel@tonic-gate );
3247c478bd9Sstevel@tonic-gate 
3257c478bd9Sstevel@tonic-gate /* pam_getenv is called to retrieve an env variable from the PAM handle */
3267c478bd9Sstevel@tonic-gate 
3277c478bd9Sstevel@tonic-gate extern char *
3287c478bd9Sstevel@tonic-gate pam_getenv(
3297c478bd9Sstevel@tonic-gate 	pam_handle_t	*pamh,
3307c478bd9Sstevel@tonic-gate 	const char	*name
3317c478bd9Sstevel@tonic-gate );
3327c478bd9Sstevel@tonic-gate 
3337c478bd9Sstevel@tonic-gate /* pam_getenvlist is called to retrieve all env variables from the PAM handle */
3347c478bd9Sstevel@tonic-gate 
3357c478bd9Sstevel@tonic-gate extern char **
3367c478bd9Sstevel@tonic-gate pam_getenvlist(
3377c478bd9Sstevel@tonic-gate 	pam_handle_t	*pamh
3387c478bd9Sstevel@tonic-gate );
3397c478bd9Sstevel@tonic-gate 
3407c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
3417c478bd9Sstevel@tonic-gate }
3427c478bd9Sstevel@tonic-gate #endif
3437c478bd9Sstevel@tonic-gate 
3447c478bd9Sstevel@tonic-gate #endif /* _PAM_APPL_H */
345