1/*-
2 * Copyright (c) 2002 Networks Associates Technology, Inc.
3 * All rights reserved.
4 *
5 * This software was developed for the FreeBSD Project by ThinkSec AS and
6 * NAI Labs, the Security Research Division of Network Associates, Inc.
7 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
8 * DARPA CHATS research program.
--- 17 unchanged lines hidden (view full) ---
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * $P4: //depot/projects/openpam/include/security/openpam.h#12 $
35 */
36
37#ifndef _SECURITY_OPENPAM_H_INCLUDED
38#define _SECURITY_OPENPAM_H_INCLUDED
39
40/*
41 * Annoying but necessary header pollution
42 */
--- 17 unchanged lines hidden (view full) ---
60
61int
62pam_error(pam_handle_t *_pamh,
63 const char *_fmt,
64 ...);
65
66int
67pam_get_authtok(pam_handle_t *_pamh,
68 const char **_authtok,
69 const char *_prompt);
70
71int
72pam_info(pam_handle_t *_pamh,
73 const char *_fmt,
74 ...);
75
--- 35 unchanged lines hidden (view full) ---
111 PAM_LOG_VERBOSE,
112 PAM_LOG_NOTICE,
113 PAM_LOG_ERROR
114};
115
116/*
117 * Log to syslog
118 */
119void _openpam_log(int _level,
120 const char *_func,
121 const char *_fmt,
122 ...);
123
124#if defined(__STDC__) && (__STDC_VERSION__ > 199901L)
125#define openpam_log(lvl, fmt, ...) \
126 _openpam_log((lvl), __func__, fmt, __VA_ARGS__)
127#elif defined(__GNUC__)
128#define openpam_log(lvl, fmt...) \
129 _openpam_log((lvl), __func__, ##fmt)
130#else
131extern openpam_log(int _level, const char *_format, ...);
132#endif
133
134/*
135 * Generic conversation function
136 */
137struct pam_message;
138struct pam_response;
139int openpam_ttyconv(int _n,
--- 44 unchanged lines hidden (view full) ---
184 pam_module_t *prev;
185 pam_module_t *next;
186};
187
188/*
189 * Infrastructure for static modules using GCC linker sets.
190 * You are not expected to understand this.
191 */
192#if defined(__GNUC__) && !defined(__PIC__)
193#if defined(__FreeBSD__)
194#define PAM_SOEXT ".so"
195#else
196#error Static linking is not supported on your platform
197#endif
198/* gcc, static linking */
199#include <sys/cdefs.h>
200#include <linker_set.h>
201#define OPENPAM_STATIC_MODULES
202#define PAM_EXTERN static
203#define PAM_MODULE_ENTRY(name) \
204static char _pam_name[] = name PAM_SOEXT; \
205static struct pam_module _pam_module = { _pam_name, { \
--- 15 unchanged lines hidden ---
2 * Copyright (c) 2002 Networks Associates Technology, Inc.
3 * All rights reserved.
4 *
5 * This software was developed for the FreeBSD Project by ThinkSec AS and
6 * NAI Labs, the Security Research Division of Network Associates, Inc.
7 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
8 * DARPA CHATS research program.
--- 17 unchanged lines hidden (view full) ---
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * $P4: //depot/projects/openpam/include/security/openpam.h#12 $
35 */
36
37#ifndef _SECURITY_OPENPAM_H_INCLUDED
38#define _SECURITY_OPENPAM_H_INCLUDED
39
40/*
41 * Annoying but necessary header pollution
42 */
--- 17 unchanged lines hidden (view full) ---
60
61int
62pam_error(pam_handle_t *_pamh,
63 const char *_fmt,
64 ...);
65
66int
67pam_get_authtok(pam_handle_t *_pamh,
68 const char **_authtok,
69 const char *_prompt);
70
71int
72pam_info(pam_handle_t *_pamh,
73 const char *_fmt,
74 ...);
75
--- 35 unchanged lines hidden (view full) ---
111 PAM_LOG_VERBOSE,
112 PAM_LOG_NOTICE,
113 PAM_LOG_ERROR
114};
115
116/*
117 * Log to syslog
118 */
119void _openpam_log(int _level,
120 const char *_func,
121 const char *_fmt,
122 ...);
123
124#if defined(__STDC__) && (__STDC_VERSION__ > 199901L)
125#define openpam_log(lvl, fmt, ...) \
126 _openpam_log((lvl), __func__, fmt, __VA_ARGS__)
127#elif defined(__GNUC__)
128#define openpam_log(lvl, fmt...) \
129 _openpam_log((lvl), __func__, ##fmt)
130#else
131extern openpam_log(int _level, const char *_format, ...);
132#endif
133
134/*
135 * Generic conversation function
136 */
137struct pam_message;
138struct pam_response;
139int openpam_ttyconv(int _n,
--- 44 unchanged lines hidden (view full) ---
184 pam_module_t *prev;
185 pam_module_t *next;
186};
187
188/*
189 * Infrastructure for static modules using GCC linker sets.
190 * You are not expected to understand this.
191 */
192#if defined(__GNUC__) && !defined(__PIC__)
193#if defined(__FreeBSD__)
194#define PAM_SOEXT ".so"
195#else
196#error Static linking is not supported on your platform
197#endif
198/* gcc, static linking */
199#include <sys/cdefs.h>
200#include <linker_set.h>
201#define OPENPAM_STATIC_MODULES
202#define PAM_EXTERN static
203#define PAM_MODULE_ENTRY(name) \
204static char _pam_name[] = name PAM_SOEXT; \
205static struct pam_module _pam_module = { _pam_name, { \
--- 15 unchanged lines hidden ---