pam_set_item(3)

pam_set_item3

Set authentication information

Usage

#include <sys/types.h>

#include <security/pam_appl.h>

int

pam_set_item(pam_handle_t *pamh, int item_type, const void *item);

Overview

The pam_set_item() function sets the item specified by the item_type argument to a copy of the object pointed to by the item argument. The item is stored in the PAM context specified by the pamh argument. See pam_get_item(3) for a list of recognized item types.

Return values

The pam_set_item() function returns one of the following values:

[PAM_SUCCESS]

Success.

[PAM_BAD_ITEM]

Unrecognized or restricted item.

[PAM_BUF_ERR]

Memory buffer error.

Releases

64 releases since FreeBSD 4.5-RELEASE; the text changed 16 times.

  1. 4.5–4.11
  2. 5.0
  3. 5.1
  4. 5.2–5.2.1
  5. 5.3–5.5
  6. 6.0–6.3
  7. 6.4
  8. 7.0
  9. 7.1–9.1
  10. 9.2
  11. 9.3–10.0
  12. 10.1–11.2
  13. 11.3–11.4
  14. 12.0–12.2
  15. 12.3–13.2
  16. 13.3–14.5
  17. 15.0–16.0

Standards

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

Authors

The pam_set_item() 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.

The OpenPAM library is maintained by Dag-Erling Smørgrav ⟨[email protected]⟩.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.