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