xref: /netbsd-src/external/bsd/openpam/dist/doc/man/pam_get_item.3 (revision 0d9d0fd8a30be9a1924e715bbcf67a4a83efd262)
1*0d9d0fd8Schristos.\"	$NetBSD: pam_get_item.3,v 1.9 2023/06/30 21:46:20 christos Exp $
244269bb5Schristos.\"
38fa0fefeSchristos.\" Generated from pam_get_item.c by gendoc.pl
4*0d9d0fd8Schristos.Dd June 27, 2023
544269bb5Schristos.Dt PAM_GET_ITEM 3
644269bb5Schristos.Os
744269bb5Schristos.Sh NAME
844269bb5Schristos.Nm pam_get_item
944269bb5Schristos.Nd get PAM information
1044269bb5Schristos.Sh SYNOPSIS
1144269bb5Schristos.In sys/types.h
1244269bb5Schristos.In security/pam_appl.h
1344269bb5Schristos.Ft "int"
1444269bb5Schristos.Fn pam_get_item "const pam_handle_t *pamh" "int item_type" "const void **item"
1544269bb5Schristos.Sh DESCRIPTION
1644269bb5SchristosThe
17e1b25b17Schristos.Fn pam_get_item
1844269bb5Schristosfunction stores a pointer to the item specified by
1944269bb5Schristosthe
2044269bb5Schristos.Fa item_type
2144269bb5Schristosargument in the location pointed to by the
2244269bb5Schristos.Fa item
2344269bb5Schristosargument.
2444269bb5SchristosThe item is retrieved from the PAM context specified by the
2544269bb5Schristos.Fa pamh
2644269bb5Schristosargument.
2744269bb5SchristosIf
28e1b25b17Schristos.Fn pam_get_item
2944269bb5Schristosfails, the
3044269bb5Schristos.Fa item
3144269bb5Schristosargument is untouched.
3244269bb5Schristos.Pp
3344269bb5SchristosThe following item types are recognized:
3444269bb5Schristos.Bl -tag -width 18n
3544269bb5Schristos.It Dv PAM_SERVICE
3644269bb5SchristosThe name of the requesting service.
3744269bb5Schristos.It Dv PAM_USER
3844269bb5SchristosThe name of the user the application is trying to
3944269bb5Schristosauthenticate.
4044269bb5Schristos.It Dv PAM_TTY
4144269bb5SchristosThe name of the current terminal.
4244269bb5Schristos.It Dv PAM_RHOST
4344269bb5SchristosThe name of the applicant's host.
4444269bb5Schristos.It Dv PAM_CONV
4544269bb5SchristosA
4644269bb5Schristos.Vt struct pam_conv
4744269bb5Schristosdescribing the current conversation
4844269bb5Schristosfunction.
4944269bb5Schristos.It Dv PAM_AUTHTOK
5044269bb5SchristosThe current authentication token.
5144269bb5Schristos.It Dv PAM_OLDAUTHTOK
5244269bb5SchristosThe expired authentication token.
5344269bb5Schristos.It Dv PAM_RUSER
5444269bb5SchristosThe name of the applicant.
5544269bb5Schristos.It Dv PAM_USER_PROMPT
5644269bb5SchristosThe prompt to use when asking the applicant for a user
5744269bb5Schristosname to authenticate as.
5844269bb5Schristos.It Dv PAM_AUTHTOK_PROMPT
5944269bb5SchristosThe prompt to use when asking the applicant for an
6044269bb5Schristosauthentication token.
6144269bb5Schristos.It Dv PAM_OLDAUTHTOK_PROMPT
6244269bb5SchristosThe prompt to use when asking the applicant for an
6344269bb5Schristosexpired authentication token prior to changing it.
6444269bb5Schristos.It Dv PAM_HOST
6544269bb5SchristosThe name of the host the application runs on.
661ae23164Schristos.It Dv PAM_SOCKADDR
671ae23164SchristosThe sockaddr_storage of the applicants's host.
681ae23164Schristos.It Dv PAM_NUSER
691ae23164SchristosThe
701ae23164Schristos.Do
711ae23164Schristosnested
721ae23164Schristos.Dc
731ae23164Schristosuser if this is a login on top of a previous one.
7444269bb5Schristos.El
7544269bb5Schristos.Pp
7644269bb5SchristosSee
7744269bb5Schristos.Xr pam_start 3
7844269bb5Schristosfor a description of
7944269bb5Schristos.Vt struct pam_conv .
8044269bb5Schristos.Sh RETURN VALUES
8144269bb5SchristosThe
82e1b25b17Schristos.Fn pam_get_item
8344269bb5Schristosfunction returns one of the following values:
8444269bb5Schristos.Bl -tag -width 18n
854cb4af11Schristos.It Bq Er PAM_SUCCESS
864cb4af11SchristosSuccess.
874cb4af11Schristos.It Bq Er PAM_BAD_ITEM
884cb4af11SchristosUnrecognized or restricted item.
8944269bb5Schristos.El
9044269bb5Schristos.Sh SEE ALSO
9144269bb5Schristos.Xr pam 3 ,
9244269bb5Schristos.Xr pam_set_item 3 ,
9344269bb5Schristos.Xr pam_start 3 ,
9444269bb5Schristos.Xr pam_strerror 3
9544269bb5Schristos.Sh STANDARDS
9644269bb5Schristos.Rs
9744269bb5Schristos.%T "X/Open Single Sign-On Service (XSSO) - Pluggable Authentication Modules"
9844269bb5Schristos.%D "June 1997"
9944269bb5Schristos.Re
10044269bb5Schristos.Sh AUTHORS
10144269bb5SchristosThe
102e1b25b17Schristos.Fn pam_get_item
103e1b25b17Schristosfunction and this manual page were
104e1b25b17Schristosdeveloped for the
10544269bb5Schristos.Fx
106e1b25b17SchristosProject by ThinkSec AS and Network Associates Laboratories, the
10744269bb5SchristosSecurity Research Division of Network Associates, Inc.\& under
10844269bb5SchristosDARPA/SPAWAR contract N66001-01-C-8035
10944269bb5Schristos.Pq Dq CBOSS ,
11044269bb5Schristosas part of the DARPA CHATS research program.
1118fa0fefeSchristos.Pp
1128fa0fefeSchristosThe OpenPAM library is maintained by
1134cb4af11Schristos.An Dag-Erling Sm\(/orgrav Aq Mt des@des.no .
114