---
name: "pam_get_data"
section: "3"
platform: "macos"
package: "OpenPAM"
version: "35"
release: "macOS 26.5"
platforms: ["linux", "freebsd", "macos"]
url: "https://new.carta.tech/pam_get_data"
---

# pam\_get\_data(3)

get module information

## NAME

**pam\_get\_data** – get module information

## LIBRARY

library “libpam”

## SYNOPSIS

**#include \<sys/types.h\>**

**#include \<security/pam\_appl.h\>**

*int*\

**pam\_get\_data**(*const pam\_handle\_t \*pamh*, *const char \*module\_data\_name*, *const void \*\*data*);

## DESCRIPTION

The **pam\_get\_data** function looks up the opaque object associated with the string specified by the *module\_data\_name* argument, in the PAM context specified by the *pamh* argument. A pointer to the object is stored in the location pointed to by the *data* argument.

This function and its counterpart [pam\_set\_data(3)](/pam_set_data/3.md) are useful for managing data that are meaningful only to a particular service module.

## RETURN VALUES

The **pam\_get\_data** function returns one of the following values:

- \[PAM\_NO\_MODULE\_DATA\]

  Module data not found.

- \[PAM\_SYSTEM\_ERR\]

  System error.

## SEE ALSO

[pam(3)](/pam/3.md), [pam\_set\_data(3)](/pam_set_data/3.md), [pam\_strerror(3)](/pam_strerror/3.md)

## STANDARDS

*X/Open Single Sign-On Service (XSSO) - Pluggable Authentication Modules*, June 1997.

## AUTHORS

The **pam\_get\_data** function and this manual page were developed for the FreeBSD Project by ThinkSec AS and Network Associates Laboratories, the Security Research Division of Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 (“CBOSS”), as part of the DARPA CHATS research program.
