]> granicus.if.org Git - linux-pam/blob - doc/man/pam_setcred.3
Relevant BUGIDs:
[linux-pam] / doc / man / pam_setcred.3
1 .\"     Title: pam_setcred
2 .\"    Author: 
3 .\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
4 .\"      Date: 06/27/2006
5 .\"    Manual: Linux\-PAM Manual
6 .\"    Source: Linux\-PAM Manual
7 .\"
8 .TH "PAM_SETCRED" "3" "06/27/2006" "Linux\-PAM Manual" "Linux\-PAM Manual"
9 .\" disable hyphenation
10 .nh
11 .\" disable justification (adjust text to left margin only)
12 .ad l
13 .SH "NAME"
14 pam_setcred \- establish / delete user credentials
15 .SH "SYNOPSIS"
16 .sp
17 .ft B
18 .nf
19 #include <security/pam_appl.h>
20 .fi
21 .ft
22 .HP 16
23 .BI "int pam_setcred(pam_handle_t\ *" "pamh" ", int\ " "flags" ");"
24 .SH "DESCRIPTION"
25 .PP
26 The
27 \fBpam_setcred\fR
28 function is used to establish, maintain and delete the credentials of a user. It should be called after a user has been authenticated and before a session is opened for the user (with
29 \fBpam_open_session\fR(3)).
30 .PP
31 A credential is something that the user possesses. It is some property, such as a
32 \fIKerberos\fR
33 ticket, or a supplementary group membership that make up the uniqueness of a given user. On a Linux system the user's
34 \fIUID\fR
35 and
36 \fIGID\fR's are credentials too. However, it has been decided that these properties (along with the default supplementary groups of which the user is a member) are credentials that should be set directly by the application and not by PAM. Such credentials should be established, by the application, prior to a call to this function. For example,
37 \fBinitgroups\fR(2)
38 (or equivalent) should have been performed.
39 .PP
40 Valid
41 \fIflags\fR, any one of which, may be logically OR'd with
42 \fBPAM_SILENT\fR, are:
43 .TP 3n
44 PAM_ESTABLISH_CRED
45 Initialize the credentials for the user.
46 .TP 3n
47 PAM_DELETE_CRED
48 Delete the user's credentials.
49 .TP 3n
50 PAM_REINITIALIZE_CRED
51 Fully reinitialize the user's credentials.
52 .TP 3n
53 PAM_REFRESH_CRED
54 Extend the lifetime of the existing credentials.
55 .SH "RETURN VALUES"
56 .TP 3n
57 PAM_BUF_ERR
58 Memory buffer error.
59 .TP 3n
60 PAM_CRED_ERR
61 Failed to set user credentials.
62 .TP 3n
63 PAM_CRED_EXPIRED
64 User credentials are expired.
65 .TP 3n
66 PAM_CRED_UNAVAIL
67 Failed to retrieve user credentials.
68 .TP 3n
69 PAM_SUCCESS
70 Data was successful stored.
71 .TP 3n
72 PAM_SYSTEM_ERR
73 A NULL pointer was submitted as PAM handle, the function was called by a module or another system error occured.
74 .TP 3n
75 PAM_USER_UNKNOWN
76 User is not known to an authentication module.
77 .SH "SEE ALSO"
78 .PP
79
80 \fBpam_authenticate\fR(3),
81 \fBpam_open_session\fR(3),
82 \fBpam_strerror\fR(3)