Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / libpam / doc / man / pam_setcred.3
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\" $Id: pam_setcred.3,v 1.1.1.1 1998/07/09 22:10:18 jdp Exp $
3 .\" $FreeBSD: src/contrib/libpam/doc/man/pam_setcred.3,v 1.2.6.2 2001/06/11 15:28:11 markm Exp $
4 .\" Copyright (c) Andrew G. Morgan 1996,1997 <morgan@parc.power.net>
5 .TH PAM_SETCRED 3 "1997 July 6" "PAM 0.58" "App. Programmers' Manual"
6 .SH NAME
7
8 pam_setcred \- set the credentials for the user
9
10 .SH SYNOPSIS
11 .B #include <security/pam_appl.h>
12 .sp
13 .BI "int pam_setcred(pam_handle_t " *pamh ", int  " flags ");"
14 .sp 2
15 .SH DESCRIPTION
16 .B pam_setcred
17
18 This function is used to establish, maintain and delete the
19 credentials of a user. It should be called after a user has been
20 authenticated and before a session is opened for the user (with
21 .BR pam_open_session "(3))."
22
23 It should be noted that credentials come in many forms. Examples
24 include: group memberships; ticket-files; and PAM environment
25 variables.  For this reason, it is important that the basic identity
26 of the user is established, by the application, prior to a call to
27 this function.  For example, the default
28 .BR PAM
29 environment variables should be set and also
30 .BR initgroups "(2) "
31 (or equivalent) should have been performed.
32
33 .SH "VALID FLAGS"
34 .TP
35 .BR PAM_ESTABLISH_CRED
36 initialize the credentials for the user.
37
38 .TP
39 .BR PAM_DELETE_CRED
40 delete the user's credentials.
41
42 .TP
43 .BR PAM_REINITIALIZE_CRED
44 delete and then initialize the user's credentials.
45
46 .TP
47 .BR PAM_REFRESH_CRED
48 extend the lifetime of the existing credentials.
49
50 .SH "RETURN VALUE"
51
52 On success
53 .BR PAM_SUCCESS
54 is returned, all other return values should be treated as errors.
55
56 .SH ERRORS
57 May be translated to text with
58 .BR pam_strerror "(3). "
59
60 .SH "CONFORMING TO"
61 DCE-RFC 86.0, October 1995.
62
63 .SH BUGS
64 .sp 2
65 none known.
66
67 .SH "SEE ALSO"
68
69 .BR pam_authenticate "(3), "
70 .BR pam_strerror "(3)"
71 and
72 .BR pam_open_session "(3). "
73
74 Also, see the three
75 .BR Linux-PAM
76 Guides, for
77 .BR "System administrators" ", "
78 .BR "module developers" ", "
79 and
80 .BR "application developers" ". "