640 number_to_scaled_string is duplicated in several commands
[unleashed.git] / usr / src / lib / libpam / pam_modules.h
blob42dce646f80efd3597c895c29031f1a07c7fe4cf
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright (c) 1992-1995, by Sun Microsystems, Inc.
24 * All rights reserved.
27 #ifndef _PAM_MODULES_H
28 #define _PAM_MODULES_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
36 extern int
37 pam_sm_authenticate(
38 pam_handle_t *pamh,
39 int flags,
40 int argc,
41 const char **argv);
43 extern int
44 pam_sm_setcred(
45 pam_handle_t *pamh,
46 int flags,
47 int argc,
48 const char **argv);
50 extern int
51 pam_sm_acct_mgmt(
52 pam_handle_t *pamh,
53 int flags,
54 int argc,
55 const char **argv);
57 extern int
58 pam_sm_open_session(
59 pam_handle_t *pamh,
60 int flags,
61 int argc,
62 const char **argv);
64 extern int
65 pam_sm_close_session(
66 pam_handle_t *pamh,
67 int flags,
68 int argc,
69 const char **argv);
72 * Be careful - there are flags defined for pam_chauthtok() in
73 * pam_appl.h also.
75 #define PAM_PRELIM_CHECK 0x1
76 #define PAM_UPDATE_AUTHTOK 0x2
78 extern int
79 pam_sm_chauthtok(
80 pam_handle_t *pamh,
81 int flags,
82 int argc,
83 const char **argv);
86 * pam_set_data is used to create module specific data, and
87 * to optionally add a cleanup handler that gets called by pam_end.
90 extern int
91 pam_set_data(
92 pam_handle_t *pamh, /* PAM handle */
93 const char *module_data_name, /* unique module data name */
94 void *data, /* the module specific data */
95 void (*cleanup)(pam_handle_t *pamh, void *data, int pam_end_status)
99 * get module specific data set by pam_set_scheme_data.
100 * returns PAM_NO_MODULE_DATA if specified module data was not found.
102 extern int
103 pam_get_data(
104 const pam_handle_t *pamh,
105 const char *module_data_name,
106 const void **data
109 #ifdef __cplusplus
111 #endif
113 #endif /* _PAM_MODULES_H */