pam_get_data(3)

pam_get_data3

Get module internal data

Usage

#include <security/pam_modules.h>

int pam_get_data(const pam_handle_t *pamh, const char *module_data_name, const void **data);

Overview

This function together with the pam_set_data(3) function is useful to manage module-specific data meaningful only to the calling PAM module.

The pam_get_data function looks up the object associated with the (hopefully) unique string module_data_name in the PAM context specified by the pamh argument. A successful call to pam_get_data will result in data pointing to the object. Note, this data is not a copy and should be treated as constant by the module.

Return values

PAM_SUCCESS

Data was successfully retrieved.

PAM_SYSTEM_ERR

A NULL pointer was submitted as PAM handle or the function was called by an application.

PAM_NO_MODULE_DATA

No module specific data is present.

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

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