xref: /netbsd-src/external/bsd/openpam/dist/doc/man/pam_authenticate.3 (revision 0d9d0fd8a30be9a1924e715bbcf67a4a83efd262)
1.\"	$NetBSD: pam_authenticate.3,v 1.9 2023/06/30 21:46:20 christos Exp $
2.\"
3.\" Generated from pam_authenticate.c by gendoc.pl
4.Dd June 27, 2023
5.Dt PAM_AUTHENTICATE 3
6.Os
7.Sh NAME
8.Nm pam_authenticate
9.Nd perform authentication within the PAM framework
10.Sh SYNOPSIS
11.In sys/types.h
12.In security/pam_appl.h
13.Ft "int"
14.Fn pam_authenticate "pam_handle_t *pamh" "int flags"
15.Sh DESCRIPTION
16The
17.Fn pam_authenticate
18function attempts to authenticate the user
19associated with the pam context specified by the
20.Fa pamh
21argument.
22.Pp
23The application is free to call
24.Fn pam_authenticate
25as many times as it
26wishes, but some modules may maintain an internal retry counter and
27return
28.Dv PAM_MAXTRIES
29when it exceeds some preset or hardcoded limit.
30.Pp
31The
32.Fa flags
33argument is the binary or of zero or more of the following
34values:
35.Bl -tag -width 18n
36.It Dv PAM_SILENT
37Do not emit any messages.
38.It Dv PAM_DISALLOW_NULL_AUTHTOK
39Fail if the user's authentication token is null.
40.El
41.Pp
42If any other bits are set,
43.Fn pam_authenticate
44will return
45.Dv PAM_BAD_CONSTANT .
46.Sh RETURN VALUES
47The
48.Fn pam_authenticate
49function returns one of the following values:
50.Bl -tag -width 18n
51.It Bq Er PAM_SUCCESS
52Success.
53.It Bq Er PAM_ABORT
54General failure.
55.It Bq Er PAM_AUTHINFO_UNAVAIL
56Authentication information is unavailable.
57.It Bq Er PAM_AUTH_ERR
58Authentication error.
59.It Bq Er PAM_BAD_CONSTANT
60Bad constant.
61.It Bq Er PAM_BUF_ERR
62Memory buffer error.
63.It Bq Er PAM_CONV_ERR
64Conversation failure.
65.It Bq Er PAM_CRED_INSUFFICIENT
66Insufficient credentials.
67.It Bq Er PAM_MAXTRIES
68Maximum number of tries exceeded.
69.It Bq Er PAM_PERM_DENIED
70Permission denied.
71.It Bq Er PAM_SERVICE_ERR
72Error in service module.
73.It Bq Er PAM_SYSTEM_ERR
74System error.
75.It Bq Er PAM_USER_UNKNOWN
76Unknown user.
77.El
78.Sh SEE ALSO
79.Xr pam 3 ,
80.Xr pam_strerror 3
81.Sh STANDARDS
82.Rs
83.%T "X/Open Single Sign-On Service (XSSO) - Pluggable Authentication Modules"
84.%D "June 1997"
85.Re
86.Sh AUTHORS
87The
88.Fn pam_authenticate
89function and this manual page were
90developed for the
91.Fx
92Project by ThinkSec AS and Network Associates Laboratories, the
93Security Research Division of Network Associates, Inc.\& under
94DARPA/SPAWAR contract N66001-01-C-8035
95.Pq Dq CBOSS ,
96as part of the DARPA CHATS research program.
97.Pp
98The OpenPAM library is maintained by
99.An Dag-Erling Sm\(/orgrav Aq Mt des@des.no .
100