The Conversation Function Getting the PAM_CONV item returns a pointer to a struct conv, defined as follows: struct pam_conv { int (*conv)(int num_msg, const struct pam_message **msg, struct pam_response **resp, void *appdata_ptr); void *appdata_ptr; }; The 'conv' function may be invoked by the module to interact with the application. It may accept 1 (or more) messages in the 'msg' parameter, and will return an equivalent number of responses (even for read-only messages). A message structure looks as follows: struct pam_message { int msg_style; const char *msg; }; The 'msg_style' may be one of: PAM_PROMPT_ECHO_OFF - obtain a string with no echo (good for obtaining passwords). PAM_PROMPT_ECHO_ON - obtain string with echo set to 'on'. PAM_ERROR_MSG - display an error message to the user. PAM_TEXT_INFO - display some general text to the user.