1pam_sm_acct_mgmt(3PAM) PAM Library Functions pam_sm_acct_mgmt(3PAM)
2
3
4
6 pam_sm_acct_mgmt - service provider implementation for pam_acct_mgmt
7
9 cc [ flag ... ] file ... -lpam [ library ... ]
10 #include <security/pam_appl.h>
11 #include <security/pam_modules.h>
12
13
14
15 int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc,
16 const char **argv);
17
18
20 In response to a call to pam_acct_mgmt(3PAM), the PAM framework calls
21 pam_sm_acct_mgmt() from the modules listed in the pam.conf(4) file. The
22 account management provider supplies the back-end functionality for
23 this interface function. Applications should not call this API
24 directly.
25
26
27 The pam_sm_acct_mgmt() function determines whether or not the current
28 user's account and password are valid. This includes checking for
29 password and account expiration, and valid login times. The user in
30 question is specified by a prior call to pam_start(), and is referenced
31 by the authentication handle, pamh, which is passed as the first argu‐
32 ment to pam_sm_acct_mgmt(). The following flags may be set in the flags
33 field:
34
35 PAM_SILENT The account management service should not
36 generate any messages.
37
38
39 PAM_DISALLOW_NULL_AUTHTOK The account management service should
40 return PAM_NEW_AUTHTOK_REQD if the user
41 has a null authentication token.
42
43
44
45 The argc argument represents the number of module options passed in
46 from the configuration file pam.conf(4). argv specifies the module
47 options, which are interpreted and processed by the account management
48 service. Please refer to the specific module man pages for the various
49 available options. If an unknown option is passed to the module, an
50 error should be logged through syslog(3C) and the option ignored.
51
52
53 If an account management module determines that the user password has
54 aged or expired, it should save this information as state in the
55 authentication handle, pamh, using pam_set_data(). pam_chauthok() uses
56 this information to determine which passwords have expired.
57
59 If there are no restrictions to logging in, PAM_SUCCESS is returned.
60 The following error values may also be returned upon error:
61
62 PAM_USER_UNKNOWN User not known to underlying authentication
63 module.
64
65
66 PAM_NEW_AUTHTOK_REQD New authentication token required.
67
68
69 PAM_ACCT_EXPIRED User account has expired.
70
71
72 PAM_PERM_DENIED User denied access to account at this time.
73
74
75 PAM_IGNORE Ignore underlying account module regardless of
76 whether the control flag is required, optional
77 or sufficient.
78
79
81 See attributes(5) for description of the following attributes:
82
83
84
85
86 ┌─────────────────────────────┬─────────────────────────────┐
87 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
88 ├─────────────────────────────┼─────────────────────────────┤
89 │Interface Stability │ Stable │
90 ├─────────────────────────────┼─────────────────────────────┤
91 │MT-Level │MT-Safe with exceptions │
92 └─────────────────────────────┴─────────────────────────────┘
93
95 pam(3PAM), pam_acct_mgmt(3PAM), pam_set_data(3PAM), pam_start(3PAM),
96 syslog(3C), libpam(3LIB), pam.conf(4), attributes(5)
97
99 The interfaces in libpam are MT-Safe only if each thread within the
100 multithreaded application uses its own PAM handle.
101
102
103 If the PAM_REPOSITORY item_type is set and a service module does not
104 recognize the type, the service module does not process any informa‐
105 tion, and returns PAM_IGNORE. If the PAM_REPOSITORY item_type is not
106 set, a service module performs its default action.
107
108
109
110SunOS 5.11 18 Nov 2003 pam_sm_acct_mgmt(3PAM)