xref: /freebsd/contrib/openpam/doc/man/pam_setcred.3 (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1.\" Generated from pam_setcred.c by gendoc.pl
2.Dd June 27, 2023
3.Dt PAM_SETCRED 3
4.Os
5.Sh NAME
6.Nm pam_setcred
7.Nd modify / delete user credentials for an authentication service
8.Sh SYNOPSIS
9.In sys/types.h
10.In security/pam_appl.h
11.Ft "int"
12.Fn pam_setcred "pam_handle_t *pamh" "int flags"
13.Sh DESCRIPTION
14The
15.Fn pam_setcred
16function manages the application's credentials.
17.Pp
18The
19.Fa flags
20argument is the binary or of zero or more of the following
21values:
22.Bl -tag -width 18n
23.It Dv PAM_SILENT
24Do not emit any messages.
25.It Dv PAM_ESTABLISH_CRED
26Establish the credentials of the target user.
27.It Dv PAM_DELETE_CRED
28Revoke all established credentials.
29.It Dv PAM_REINITIALIZE_CRED
30Fully reinitialise credentials.
31.It Dv PAM_REFRESH_CRED
32Refresh credentials.
33.El
34.Pp
35The latter four are mutually exclusive.
36.Pp
37If any other bits are set,
38.Fn pam_setcred
39will return
40.Dv PAM_BAD_CONSTANT .
41.Sh RETURN VALUES
42The
43.Fn pam_setcred
44function returns one of the following values:
45.Bl -tag -width 18n
46.It Bq Er PAM_SUCCESS
47Success.
48.It Bq Er PAM_ABORT
49General failure.
50.It Bq Er PAM_BAD_CONSTANT
51Bad constant.
52.It Bq Er PAM_BUF_ERR
53Memory buffer error.
54.It Bq Er PAM_CONV_ERR
55Conversation failure.
56.It Bq Er PAM_CRED_ERR
57Failed to set user credentials.
58.It Bq Er PAM_CRED_EXPIRED
59User credentials have expired.
60.It Bq Er PAM_CRED_UNAVAIL
61Failed to retrieve user credentials.
62.It Bq Er PAM_PERM_DENIED
63Permission denied.
64.It Bq Er PAM_SERVICE_ERR
65Error in service module.
66.It Bq Er PAM_SYSTEM_ERR
67System error.
68.It Bq Er PAM_USER_UNKNOWN
69Unknown user.
70.El
71.Sh SEE ALSO
72.Xr pam 3 ,
73.Xr pam_strerror 3
74.Sh STANDARDS
75.Rs
76.%T "X/Open Single Sign-On Service (XSSO) - Pluggable Authentication Modules"
77.%D "June 1997"
78.Re
79.Sh AUTHORS
80The
81.Fn pam_setcred
82function and this manual page were
83developed for the
84.Fx
85Project by ThinkSec AS and Network Associates Laboratories, the
86Security Research Division of Network Associates, Inc.\& under
87DARPA/SPAWAR contract N66001-01-C-8035
88.Pq Dq CBOSS ,
89as part of the DARPA CHATS research program.
90.Pp
91The OpenPAM library is maintained by
92.An Dag-Erling Sm\(/orgrav Aq Mt des@des.no .
93