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_ACCT_MGMT 3PAM "Nov 18, 2003"
8 pam_sm_acct_mgmt \- service provider implementation for pam_acct_mgmt
12 \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lpam\fR [ \fIlibrary\fR ... ]
13 #include <security/pam_appl.h>
14 #include <security/pam_modules.h>
18 \fBint\fR \fBpam_sm_acct_mgmt\fR(\fBpam_handle_t *\fR\fIpamh\fR, \fBint\fR \fIflags\fR, \fBint\fR \fIargc\fR,
19 \fBconst char **\fR\fIargv\fR);
25 In response to a call to \fBpam_acct_mgmt\fR(3PAM), the \fBPAM\fR framework
26 calls \fBpam_sm_acct_mgmt()\fR from the modules listed in the \fBpam.conf\fR(4)
27 file. The account management provider supplies the back-end functionality for
28 this interface function. Applications should not call this \fBAPI\fR directly.
31 The \fBpam_sm_acct_mgmt()\fR function determines whether or not the current
32 user's account and password are valid. This includes checking for password
33 and account expiration, and valid login times. The user in question is
34 specified by a prior call to \fBpam_start()\fR, and is referenced by the
35 authentication handle, \fIpamh\fR, which is passed as the first argument to
36 \fBpam_sm_acct_mgmt()\fR. The following flags may be set in the \fIflags\fR
41 \fB\fBPAM_SILENT\fR\fR
44 The account management service should not generate any messages.
50 \fB\fBPAM_DISALLOW_NULL_AUTHTOK\fR\fR
53 The account management service should return \fBPAM_NEW_AUTHTOK_REQD\fR if the
54 user has a null authentication token.
59 The \fIargc\fR argument represents the number of module options passed in from
60 the configuration file \fBpam.conf\fR(4). \fIargv\fR specifies the module
61 options, which are interpreted and processed by the account management service.
62 Please refer to the specific module man pages for the various available
63 \fIoptions\fR. If an unknown option is passed to the module, an error should be
64 logged through \fBsyslog\fR(3C) and the option ignored.
67 If an account management module determines that the user password has aged or
68 expired, it should save this information as state in the authentication handle,
69 \fIpamh\fR, using \fBpam_set_data()\fR. \fBpam_chauthok()\fR uses this
70 information to determine which passwords have expired.
74 If there are no restrictions to logging in, \fBPAM_SUCCESS\fR is returned.
75 The following error values may also be returned upon error:
79 \fB\fBPAM_USER_UNKNOWN\fR\fR
82 User not known to underlying authentication module.
88 \fB\fBPAM_NEW_AUTHTOK_REQD\fR\fR
91 New authentication token required.
97 \fB\fBPAM_ACCT_EXPIRED\fR\fR
100 User account has expired.
106 \fB\fBPAM_PERM_DENIED\fR\fR
109 User denied access to account at this time.
115 \fB\fBPAM_IGNORE\fR\fR
118 Ignore underlying account module regardless of whether the control flag is
119 \fIrequired,\fR \fIoptional\fR or \fIsufficient\fR.
125 See \fBattributes\fR(5) for description of the following attributes:
133 ATTRIBUTE TYPE ATTRIBUTE VALUE
135 Interface Stability Stable
137 MT-Level MT-Safe with exceptions
143 \fBpam\fR(3PAM), \fBpam_acct_mgmt\fR(3PAM), \fBpam_set_data\fR(3PAM),
144 \fBpam_start\fR(3PAM), \fBsyslog\fR(3C), \fBlibpam\fR(3LIB), \fBpam.conf\fR(4),
149 The interfaces in \fBlibpam\fR are MT-Safe only if each thread within the
150 multithreaded application uses its own \fBPAM\fR handle.
153 If the \fBPAM_REPOSITORY\fR \fIitem_type\fR is set and a service module does
154 not recognize the type, the service module does not process any information,
155 and returns \fBPAM_IGNORE\fR. If the \fBPAM_REPOSITORY\fR \fIitem_type\fR is
156 not set, a service module performs its default action.