info > pam_get_data(3)

```html

📖 PAM_GET_DATA(3) — Linux-PAM Manual

🏷️ NAME

pam_get_data — get module internal data

🚀 Quick Reference

Use Case Command Description
Retrieve module-specific data pam_get_data(pamh, "my_data", &data) 🔍 Looks up data associated with a unique string key in the PAM context
Set module-specific data pam_set_data(pamh, "my_data", data, cleanup) 📦 Stores data for later retrieval by the same module
Check if data exists pam_get_data returns PAM_NO_MODULE_DATA ❓ Returns this error when no data is found or the entry is NULL

📄 SYNOPSIS

#include <security/pam_modules.h>

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

📝 DESCRIPTION

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

📚 SEE ALSO

pam_end(3), pam_set_data(3), pam_strerror(3)

Linux-PAM Manual — 06/08/2020 — PAM_GET_DATA(3)

```
pam_get_data(3)
📖 PAM_GET_DATA(3) — Linux-PAM Manual 🏷️ NAME 🚀 Quick Reference 📄 SYNOPSIS 📝 DESCRIPTION 🔙 RETURN VALUES 📚 SEE ALSO

Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-06 18:50 @216.73.216.139
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format