pam_prompt(3)

pam_prompt3

Interface to conversation function

Usage

#include <security/pam_ext.h>

int pam_prompt(pam_handle_t *pamh, int style, char **response, const char *fmt, ...);

int pam_vprompt(pam_handle_t *pamh, int style, char **response, const char *fmt, va_list args);

Overview

The pam_prompt function constructs a message from the specified format string and arguments and passes it to the conversation function as set by the service. Upon successful return, response is set to point to a string returned from the conversation function. This string is allocated on heap and should be freed.

Return values

PAM_BUF_ERR

Memory buffer error.

PAM_CONV_ERR

Conversation failure.

PAM_SUCCESS

Conversation succeeded, response is set.

PAM_SYSTEM_ERR

System error.

Releases

10 releases since Debian 5.0 (Lenny); the text changed 8 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8–9
  5. 10
  6. 11
  7. 12
  8. 13
  9. Arch

Standards

The pam_prompt and pam_vprompt functions are Linux-PAM extensions.

From pam 1.7.3-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.