2 .\" Copyright (c) 1998, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH PAM_SM_OPEN_SESSION 3PAM "Oct 13, 1998"
8 pam_sm_open_session, pam_sm_close_session \- service provider implementation
9 for pam_open_session and pam_close_session
13 \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lpam\fR [ \fIlibrary\fR ... ]
14 #include <security/pam_appl.h>
15 #include <security/pam_modules.h>
19 \fBint\fR \fBpam_sm_open_session\fR(\fBpam_handle_t *\fR\fIpamh\fR, \fBint\fR \fIflags\fR,
20 \fBint\fR \fIargc\fR, \fBconst char **\fR\fIargv\fR);
25 \fBint\fR \fBpam_sm_close_session\fR(\fBpam_handle_t *\fR\fIpamh\fR, \fBint\fR \fIflags\fR,
26 \fBint\fR \fIargc\fR, \fBconst char **\fR\fIargv\fR);
32 In response to a call to \fBpam_open_session\fR(3PAM) and
33 \fBpam_close_session\fR(3PAM), the \fBPAM\fR framework calls
34 \fBpam_sm_open_session()\fR and \fBpam_sm_close_session()\fR, respectively from
35 the modules listed in the \fBpam.conf\fR(4) file. The session management
36 provider supplies the back-end functionality for this interface function.
39 The \fBpam_sm_open_session()\fR function is called to initiate session
40 management. The\fBpam_sm_close_session()\fR function is invoked when a session
41 has terminated. The argument \fIpamh\fR is an authentication handle. The
42 following flag may be set in the \fIflags\fR field:
46 \fB\fBPAM_SILENT\fR\fR
49 Session service should not generate any messages.
54 The \fIargc\fR argument represents the number of module options passed in from
55 the configuration file \fBpam.conf\fR(4). \fIargv\fR specifies the module
56 options, which are interpreted and processed by the session management service.
57 If an unknown option is passed in, an error should be logged through
58 \fBsyslog\fR(3C) and the option ignored.
62 Upon successful completion, \fBPAM_SUCCESS\fR should be returned. The
63 following values may also be returned upon error:
67 \fB\fBPAM_SESSION_ERR\fR\fR
70 Cannot make or remove an entry for the specified session.
76 \fB\fBPAM_IGNORE\fR\fR
79 Ignore underlying session module regardless of whether the control flag is
80 \fIrequired\fR, \fIoptional\fR or \fIsufficient\fR.
86 See \fBattributes\fR(5) for description of the following attributes:
94 ATTRIBUTE TYPE ATTRIBUTE VALUE
96 Interface Stability Stable
98 MT-Level MT-Safe with exceptions
104 \fBpam\fR(3PAM), \fBpam_open_session\fR(3PAM), \fBsyslog\fR(3C),
105 \fBlibpam\fR(3LIB), \fBpam.conf\fR(4), \fBattributes\fR(5)
109 The interfaces in \fBlibpam\fR are MT-Safe only if each thread within the
110 multithreaded application uses its own \fBPAM\fR handle.