pam_start.3 (2010 09)

p
pam_start(3) pam_start(3)
The maximum size of the message and the response string is
PAM_MAX_MSG_SIZE
defined in
<security/pam_appl.h>
.
The structure pam_response is used by the authentication service to get the user’s response back from the
application or user. The storage used by pam_response has to be allocated by the application and freed
by the PAM modules. The pam_response structure has the following entries:
struct pam_response{
char *resp;
int resp_retcode; /* currently not used, should be set to 0 */
};
It is the responsibility of the conversation function to strip off newline characters for
PAM_PROMPT_ECHO_OFF
and PAM_PROMPT_ECHO_ON
message styles, and to add newline characters
(if appropriate) for
PAM_ERROR_MSG
and PAM_TEXT_INFO
message styles.
appdata_ptr is an application data pointer which is passed by the application to the PAM service
modules. Since the PAM modules pass it back through the conversation function, the applications can
use this pointer to point to any application-specific data.
pam_end() is called to terminate the authentication transaction identified by pamh and to free any
storage area allocated by the authentication module. The argument, status , is passed to the
cleanup()
function stored within the pam handle, and is used to determine what module specific state must be
purged. A cleanup function is attached to the handle by the underlying PAM modules through a call to
pam_set_item (3) to free module specific data.
APPLICATION USAGE
Refer to pam(3) for information on thread-safety of PAM interfaces.
RETURN VALUE
Refer to pam(3) for information on error related return values.
SEE ALSO
pam_acct_mgmt(3), pam_authenticate(3), pam_chauthtok(3), pam_open_session(3), pam_set_item(3),
pam_setcred(3), pam_strerror(3), pam(3).
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010