openpam.h   openpam.h 
/*- /*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc. * Copyright (c) 2002-2003 Networks Associates Technology, Inc.
* Copyright (c) 2004-2007 Dag-Erling Smørgrav
* All rights reserved. * All rights reserved.
* *
* This software was developed for the FreeBSD Project by ThinkSec AS and * This software was developed for the FreeBSD Project by ThinkSec AS and
* Network Associates Laboratories, the Security Research Division of * Network Associates Laboratories, the Security Research Division of
* Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
* ("CBOSS"), as part of the DARPA CHATS research program. * ("CBOSS"), as part of the DARPA CHATS research program.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
skipping to change at line 34 skipping to change at line 35
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO SE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO SE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI AL * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI AL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI CT * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI CT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WA Y * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WA Y
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $P4: //depot/projects/openpam/include/security/openpam.h#28 $ * $Id: openpam.h 408 2007-12-21 11:36:24Z des $
*/ */
#ifndef _SECURITY_OPENPAM_H_INCLUDED #ifndef SECURITY_OPENPAM_H_INCLUDED
#define _SECURITY_OPENPAM_H_INCLUDED #define SECURITY_OPENPAM_H_INCLUDED
/* /*
* Annoying but necessary header pollution * Annoying but necessary header pollution
*/ */
#include <stdarg.h> #include <stdarg.h>
#include <security/openpam_attr.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
struct passwd; struct passwd;
/* /*
* API extensions * API extensions
*/ */
int int
openpam_borrow_cred(pam_handle_t *_pamh, openpam_borrow_cred(pam_handle_t *_pamh,
const struct passwd *_pwd); const struct passwd *_pwd)
OPENPAM_NONNULL((1,2));
void void
openpam_free_data(pam_handle_t *_pamh, openpam_free_data(pam_handle_t *_pamh,
void *_data, void *_data,
int _status); int _status);
void void
openpam_free_envlist(char **_envlist); openpam_free_envlist(char **_envlist);
const char * const char *
openpam_get_option(pam_handle_t *_pamh, openpam_get_option(pam_handle_t *_pamh,
const char *_option); const char *_option);
int int
openpam_restore_cred(pam_handle_t *_pamh); openpam_restore_cred(pam_handle_t *_pamh)
OPENPAM_NONNULL((1));
int int
openpam_set_option(pam_handle_t *_pamh, openpam_set_option(pam_handle_t *_pamh,
const char *_option, const char *_option,
const char *_value); const char *_value);
int int
pam_error(pam_handle_t *_pamh, pam_error(const pam_handle_t *_pamh,
const char *_fmt, const char *_fmt,
...); ...)
OPENPAM_FORMAT ((__printf__, 2, 3))
OPENPAM_NONNULL((1,2));
int int
pam_get_authtok(pam_handle_t *_pamh, pam_get_authtok(pam_handle_t *_pamh,
int _item, int _item,
const char **_authtok, const char **_authtok,
const char *_prompt); const char *_prompt)
OPENPAM_NONNULL((1,3));
int int
pam_info(pam_handle_t *_pamh, pam_info(const pam_handle_t *_pamh,
const char *_fmt, const char *_fmt,
...); ...)
OPENPAM_FORMAT ((__printf__, 2, 3))
OPENPAM_NONNULL((1,2));
int int
pam_prompt(pam_handle_t *_pamh, pam_prompt(const pam_handle_t *_pamh,
int _style, int _style,
char **_resp, char **_resp,
const char *_fmt, const char *_fmt,
...); ...)
OPENPAM_FORMAT ((__printf__, 4, 5))
OPENPAM_NONNULL((1,4));
int int
pam_setenv(pam_handle_t *_pamh, pam_setenv(pam_handle_t *_pamh,
const char *_name, const char *_name,
const char *_value, const char *_value,
int _overwrite); int _overwrite)
OPENPAM_NONNULL((1,2,3));
int int
pam_vinfo(pam_handle_t *_pamh, pam_vinfo(const pam_handle_t *_pamh,
const char *_fmt, const char *_fmt,
va_list _ap); va_list _ap)
OPENPAM_FORMAT ((__printf__, 2, 0))
OPENPAM_NONNULL((1,2));
int int
pam_verror(pam_handle_t *_pamh, pam_verror(const pam_handle_t *_pamh,
const char *_fmt, const char *_fmt,
va_list _ap); va_list _ap)
OPENPAM_FORMAT ((__printf__, 2, 0))
OPENPAM_NONNULL((1,2));
int int
pam_vprompt(pam_handle_t *_pamh, pam_vprompt(const pam_handle_t *_pamh,
int _style, int _style,
char **_resp, char **_resp,
const char *_fmt, const char *_fmt,
va_list _ap); va_list _ap)
OPENPAM_FORMAT ((__printf__, 4, 0))
OPENPAM_NONNULL((1,4));
/* /*
* Read cooked lines. * Read cooked lines.
* Checking for _IOFBF is a fairly reliable way to detect the presence * Checking for _IOFBF is a fairly reliable way to detect the presence
* of <stdio.h>, as SUSv3 requires it to be defined there. * of <stdio.h>, as SUSv3 requires it to be defined there.
*/ */
#ifdef _IOFBF #ifdef _IOFBF
char * char *
openpam_readline(FILE *_f, openpam_readline(FILE *_f,
int *_lineno, int *_lineno,
size_t *_lenp); size_t *_lenp)
OPENPAM_NONNULL((1));
#endif #endif
/* /*
* Log levels * Log levels
*/ */
enum { enum {
PAM_LOG_DEBUG, PAM_LOG_DEBUG,
PAM_LOG_VERBOSE, PAM_LOG_VERBOSE,
PAM_LOG_NOTICE, PAM_LOG_NOTICE,
PAM_LOG_ERROR PAM_LOG_ERROR
}; };
/* /*
* Log to syslog * Log to syslog
*/ */
void void
_openpam_log(int _level, _openpam_log(int _level,
const char *_func, const char *_func,
const char *_fmt, const char *_fmt,
...) ...)
#if defined(__GNUC__) OPENPAM_FORMAT ((__printf__, 3, 4))
__attribute__((__format__(__printf__, 3, 4))) OPENPAM_NONNULL((3));
#endif
;
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
#define openpam_log(lvl, ...) \ #define openpam_log(lvl, ...) \
_openpam_log((lvl), __func__, __VA_ARGS__) _openpam_log((lvl), __func__, __VA_ARGS__)
#elif defined(__GNUC__) && (__GNUC__ >= 3) #elif defined(__GNUC__) && (__GNUC__ >= 3)
#define openpam_log(lvl, ...) \ #define openpam_log(lvl, ...) \
_openpam_log((lvl), __func__, __VA_ARGS__) _openpam_log((lvl), __func__, __VA_ARGS__)
#elif defined(__GNUC__) && (__GNUC__ >= 2) && (__GNUC_MINOR__ >= 95) #elif defined(__GNUC__) && (__GNUC__ >= 2) && (__GNUC_MINOR__ >= 95)
#define openpam_log(lvl, fmt...) \ #define openpam_log(lvl, fmt...) \
_openpam_log((lvl), __func__, ##fmt) _openpam_log((lvl), __func__, ##fmt)
#elif defined(__GNUC__) && defined(__FUNCTION__) #elif defined(__GNUC__) && defined(__FUNCTION__)
#define openpam_log(lvl, fmt...) \ #define openpam_log(lvl, fmt...) \
_openpam_log((lvl), __FUNCTION__, ##fmt) _openpam_log((lvl), __FUNCTION__, ##fmt)
#else #else
void void
openpam_log(int _level, openpam_log(int _level,
const char *_format, const char *_format,
...); ...)
OPENPAM_FORMAT ((__printf__, 2, 3))
OPENPAM_NONNULL((2));
#endif #endif
/* /*
* Generic conversation function * Generic conversation function
*/ */
struct pam_message; struct pam_message;
struct pam_response; struct pam_response;
int openpam_ttyconv(int _n, int openpam_ttyconv(int _n,
const struct pam_message **_msg, const struct pam_message **_msg,
struct pam_response **_resp, struct pam_response **_resp,
skipping to change at line 220 skipping to change at line 240
}; };
/* /*
* Dummy service module function * Dummy service module function
*/ */
#define PAM_SM_DUMMY(type) \ #define PAM_SM_DUMMY(type) \
PAM_EXTERN int \ PAM_EXTERN int \
pam_sm_##type(pam_handle_t *pamh, int flags, \ pam_sm_##type(pam_handle_t *pamh, int flags, \
int argc, const char *argv[]) \ int argc, const char *argv[]) \
{ \ { \
\
(void)pamh; \
(void)flags; \
(void)argc; \
(void)argv; \
return (PAM_IGNORE); \ return (PAM_IGNORE); \
} }
/* /*
* PAM service module functions match this typedef * PAM service module functions match this typedef
*/ */
struct pam_handle; struct pam_handle;
typedef int (*pam_func_t)(struct pam_handle *, int, int, const char **); typedef int (*pam_func_t)(struct pam_handle *, int, int, const char **);
/* /*
* A struct that describes a module. * A struct that describes a module.
*/ */
typedef struct pam_module pam_module_t; typedef struct pam_module pam_module_t;
struct pam_module { struct pam_module {
char *path; char *path;
pam_func_t func[PAM_NUM_PRIMITIVES]; pam_func_t func[PAM_NUM_PRIMITIVES];
void *dlh; void *dlh;
int refcount;
pam_module_t *prev;
pam_module_t *next;
}; };
/* /*
* Source-code compatibility with Linux-PAM modules * Source-code compatibility with Linux-PAM modules
*/ */
#if defined(PAM_SM_AUTH) || defined(PAM_SM_ACCOUNT) || \ #if defined(PAM_SM_AUTH) || defined(PAM_SM_ACCOUNT) || \
defined(PAM_SM_SESSION) || defined(PAM_SM_PASSWORD) defined(PAM_SM_SESSION) || defined(PAM_SM_PASSWORD)
#define LINUX_PAM_MODULE # define LINUX_PAM_MODULE
#endif #endif
#if defined(LINUX_PAM_MODULE) && !defined(PAM_SM_AUTH) #if defined(LINUX_PAM_MODULE) && !defined(PAM_SM_AUTH)
#define _PAM_SM_AUTHENTICATE 0 # define _PAM_SM_AUTHENTICATE 0
#define _PAM_SM_SETCRED 0 # define _PAM_SM_SETCRED 0
#else #else
#undef PAM_SM_AUTH # undef PAM_SM_AUTH
#define PAM_SM_AUTH # define PAM_SM_AUTH
#define _PAM_SM_AUTHENTICATE pam_sm_authenticate # define _PAM_SM_AUTHENTICATE pam_sm_authenticate
#define _PAM_SM_SETCRED pam_sm_setcred # define _PAM_SM_SETCRED pam_sm_setcred
#endif #endif
#if defined(LINUX_PAM_MODULE) && !defined(PAM_SM_ACCOUNT) #if defined(LINUX_PAM_MODULE) && !defined(PAM_SM_ACCOUNT)
#define _PAM_SM_ACCT_MGMT 0 # define _PAM_SM_ACCT_MGMT 0
#else #else
#undef PAM_SM_ACCOUNT # undef PAM_SM_ACCOUNT
#define PAM_SM_ACCOUNT # define PAM_SM_ACCOUNT
#define _PAM_SM_ACCT_MGMT pam_sm_acct_mgmt # define _PAM_SM_ACCT_MGMT pam_sm_acct_mgmt
#endif #endif
#if defined(LINUX_PAM_MODULE) && !defined(PAM_SM_SESSION) #if defined(LINUX_PAM_MODULE) && !defined(PAM_SM_SESSION)
#define _PAM_SM_OPEN_SESSION 0 # define _PAM_SM_OPEN_SESSION 0
#define _PAM_SM_CLOSE_SESSION 0 # define _PAM_SM_CLOSE_SESSION 0
#else #else
#undef PAM_SM_SESSION # undef PAM_SM_SESSION
#define PAM_SM_SESSION # define PAM_SM_SESSION
#define _PAM_SM_OPEN_SESSION pam_sm_open_session # define _PAM_SM_OPEN_SESSION pam_sm_open_session
#define _PAM_SM_CLOSE_SESSION pam_sm_close_session # define _PAM_SM_CLOSE_SESSION pam_sm_close_session
#endif #endif
#if defined(LINUX_PAM_MODULE) && !defined(PAM_SM_PASSWORD) #if defined(LINUX_PAM_MODULE) && !defined(PAM_SM_PASSWORD)
#define _PAM_SM_CHAUTHTOK 0 # define _PAM_SM_CHAUTHTOK 0
#else #else
#undef PAM_SM_PASSWORD # undef PAM_SM_PASSWORD
#define PAM_SM_PASSWORD # define PAM_SM_PASSWORD
#define _PAM_SM_CHAUTHTOK pam_sm_chauthtok # define _PAM_SM_CHAUTHTOK pam_sm_chauthtok
#endif #endif
/* /*
* Infrastructure for static modules using GCC linker sets. * Infrastructure for static modules using GCC linker sets.
* You are not expected to understand this. * You are not expected to understand this.
*/ */
#if defined(__FreeBSD__) #if defined(__FreeBSD__)
#define PAM_SOEXT ".so" # define PAM_SOEXT ".so"
#else #else
#ifndef NO_STATIC_MODULES # undef NO_STATIC_MODULES
#define NO_STATIC_MODULES # define NO_STATIC_MODULES
#endif
#endif #endif
#if defined(__GNUC__) && !defined(__PIC__) && !defined(NO_STATIC_MODULES) #if defined(__GNUC__) && !defined(__PIC__) && !defined(NO_STATIC_MODULES)
/* gcc, static linking */ /* gcc, static linking */
#include <sys/cdefs.h> # include <sys/cdefs.h>
#include <linker_set.h> # include <linker_set.h>
#define OPENPAM_STATIC_MODULES # define OPENPAM_STATIC_MODULES
#define PAM_EXTERN static # define PAM_EXTERN static
#define PAM_MODULE_ENTRY(name) \ # define PAM_MODULE_ENTRY(name)
static char _pam_name[] = name PAM_SOEXT; \ \
static struct pam_module _pam_module = { _pam_name, { \ static char _pam_name[] = name PAM_SOEXT; \
_PAM_SM_AUTHENTICATE, _PAM_SM_SETCRED, _PAM_SM_ACCT_MGMT, \ static struct pam_module _pam_module = { \
_PAM_SM_OPEN_SESSION, _PAM_SM_CLOSE_SESSION, _PAM_SM_CHAUTHTOK }, \ .path = _pam_name, \
NULL, 0, NULL, NULL }; \ .func = { \
DATA_SET(_openpam_static_modules, _pam_module) [PAM_SM_AUTHENTICATE] = _PAM_SM_AUTHENTICATE, \
[PAM_SM_SETCRED] = _PAM_SM_SETCRED, \
[PAM_SM_ACCT_MGMT] = _PAM_SM_ACCT_MGMT, \
[PAM_SM_OPEN_SESSION] = _PAM_SM_OPEN_SESSION, \
[PAM_SM_CLOSE_SESSION] = _PAM_SM_CLOSE_SESSION, \
[PAM_SM_CHAUTHTOK] = _PAM_SM_CHAUTHTOK \
}, \
}; \
DATA_SET(_openpam_static_modules, _pam_module)
#else #else
/* normal case */ /* normal case */
#define PAM_EXTERN # define PAM_EXTERN
#define PAM_MODULE_ENTRY(name) # define PAM_MODULE_ENTRY(name)
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif /* !SECURITY_OPENPAM_H_INCLUDED */
 End of changes. 44 change blocks. 
66 lines changed or deleted 100 lines changed or added


 openpam_version.h   openpam_version.h 
/*- /*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc. * Copyright (c) 2002-2003 Networks Associates Technology, Inc.
* Copyright (c) 2004-2007 Dag-Erling Smørgrav
* All rights reserved. * All rights reserved.
* *
* This software was developed for the FreeBSD Project by ThinkSec AS and * This software was developed for the FreeBSD Project by ThinkSec AS and
* Network Associates Laboratories, the Security Research Division of * Network Associates Laboratories, the Security Research Division of
* Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
* ("CBOSS"), as part of the DARPA CHATS research program. * ("CBOSS"), as part of the DARPA CHATS research program.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
skipping to change at line 34 skipping to change at line 35
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO SE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO SE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI AL * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI AL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI CT * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI CT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WA Y * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WA Y
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $P4: //depot/projects/openpam/include/security/openpam_version.h#14 $ * $Id: openpam_version.h 409 2007-12-21 11:38:50Z des $
*/ */
#ifndef _OPENPAM_VERSION_H_INCLUDED #ifndef SECURITY_OPENPAM_VERSION_H_INCLUDED
#define _OPENPAM_VERSION_H_INCLUDED #define SECURITY_OPENPAM_VERSION_H_INCLUDED
#define _OPENPAM #define OPENPAM
#define _OPENPAM_VERSION 20050616 #define OPENPAM_VERSION 20071221
#define _OPENPAM_RELEASE "Figwort" #define OPENPAM_RELEASE "Hydrangea"
#endif #endif /* !SECURITY_OPENPAM_VERSION_H_INCLUDED */
 End of changes. 5 change blocks. 
6 lines changed or deleted 7 lines changed or added


 pam_appl.h   pam_appl.h 
/*- /*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc. * Copyright (c) 2002-2003 Networks Associates Technology, Inc.
* Copyright (c) 2004-2007 Dag-Erling Smørgrav
* All rights reserved. * All rights reserved.
* *
* This software was developed for the FreeBSD Project by ThinkSec AS and * This software was developed for the FreeBSD Project by ThinkSec AS and
* Network Associates Laboratories, the Security Research Division of * Network Associates Laboratories, the Security Research Division of
* Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
* ("CBOSS"), as part of the DARPA CHATS research program. * ("CBOSS"), as part of the DARPA CHATS research program.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
skipping to change at line 34 skipping to change at line 35
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO SE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO SE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI AL * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI AL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI CT * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI CT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WA Y * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WA Y
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $P4: //depot/projects/openpam/include/security/pam_appl.h#14 $ * $Id: pam_appl.h 408 2007-12-21 11:36:24Z des $
*/ */
#ifndef _PAM_APPL_H_INCLUDED #ifndef SECURITY_PAM_APPL_H_INCLUDED
#define _PAM_APPL_H_INCLUDED #define SECURITY_PAM_APPL_H_INCLUDED
#include <security/pam_types.h> #include <security/pam_types.h>
#include <security/pam_constants.h> #include <security/pam_constants.h>
#include <security/openpam_attr.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* /*
* XSSO 4.2.1, 6 * XSSO 4.2.1, 6
*/ */
int int
pam_acct_mgmt(pam_handle_t *_pamh, pam_acct_mgmt(pam_handle_t *_pamh,
int _flags); int _flags)
OPENPAM_NONNULL((1));
int int
pam_authenticate(pam_handle_t *_pamh, pam_authenticate(pam_handle_t *_pamh,
int _flags); int _flags)
OPENPAM_NONNULL((1));
int int
pam_chauthtok(pam_handle_t *_pamh, pam_chauthtok(pam_handle_t *_pamh,
int _flags); int _flags)
OPENPAM_NONNULL((1));
int int
pam_close_session(pam_handle_t *_pamh, pam_close_session(pam_handle_t *_pamh,
int _flags); int _flags)
OPENPAM_NONNULL((1));
int int
pam_end(pam_handle_t *_pamh, pam_end(pam_handle_t *_pamh,
int _status); int _status)
OPENPAM_NONNULL((1));
int int
pam_get_data(pam_handle_t *_pamh, pam_get_data(const pam_handle_t *_pamh,
const char *_module_data_name, const char *_module_data_name,
void **_data); const void **_data)
OPENPAM_NONNULL((1,2,3));
int int
pam_get_item(pam_handle_t *_pamh, pam_get_item(const pam_handle_t *_pamh,
int _item_type, int _item_type,
const void **_item); const void **_item)
OPENPAM_NONNULL((1,3));
int int
pam_get_user(pam_handle_t *_pamh, pam_get_user(pam_handle_t *_pamh,
const char **_user, const char **_user,
const char *_prompt); const char *_prompt)
OPENPAM_NONNULL((1,2));
const char * const char *
pam_getenv(pam_handle_t *_pamh, pam_getenv(pam_handle_t *_pamh,
const char *_name); const char *_name)
OPENPAM_NONNULL((1,2));
char ** char **
pam_getenvlist(pam_handle_t *_pamh); pam_getenvlist(pam_handle_t *_pamh)
OPENPAM_NONNULL((1));
int int
pam_open_session(pam_handle_t *_pamh, pam_open_session(pam_handle_t *_pamh,
int _flags); int _flags)
OPENPAM_NONNULL((1));
int int
pam_putenv(pam_handle_t *_pamh, pam_putenv(pam_handle_t *_pamh,
const char *_namevalue); const char *_namevalue)
OPENPAM_NONNULL((1,2));
int int
pam_set_data(pam_handle_t *_pamh, pam_set_data(pam_handle_t *_pamh,
const char *_module_data_name, const char *_module_data_name,
void *_data, void *_data,
void (*_cleanup)(pam_handle_t *_pamh, void (*_cleanup)(pam_handle_t *_pamh,
void *_data, void *_data,
int _pam_end_status)); int _pam_end_status))
OPENPAM_NONNULL((1,2));
int int
pam_set_item(pam_handle_t *_pamh, pam_set_item(pam_handle_t *_pamh,
int _item_type, int _item_type,
const void *_item); const void *_item)
OPENPAM_NONNULL((1));
int int
pam_setcred(pam_handle_t *_pamh, pam_setcred(pam_handle_t *_pamh,
int _flags); int _flags)
OPENPAM_NONNULL((1));
int int
pam_start(const char *_service, pam_start(const char *_service,
const char *_user, const char *_user,
const struct pam_conv *_pam_conv, const struct pam_conv *_pam_conv,
pam_handle_t **_pamh); pam_handle_t **_pamh)
OPENPAM_NONNULL((4));
const char * const char *
pam_strerror(pam_handle_t *_pamh, pam_strerror(const pam_handle_t *_pamh,
int _error_number); int _error_number);
/* /*
* Single Sign-On extensions * Single Sign-On extensions
*/ */
#if 0 #if 0
int int
pam_authenticate_secondary(pam_handle_t *_pamh, pam_authenticate_secondary(pam_handle_t *_pamh,
char *_target_username, char *_target_username,
char *_target_module_type, char *_target_module_type,
skipping to change at line 180 skipping to change at line 198
char *_src_authn_domain, char *_src_authn_domain,
char *_target_module_username, char *_target_module_username,
char *_target_module_type, char *_target_module_type,
char *_target_authn_domain); char *_target_authn_domain);
#endif /* 0 */ #endif /* 0 */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif /* !SECURITY_PAM_APPL_H_INCLUDED */
 End of changes. 24 change blocks. 
22 lines changed or deleted 40 lines changed or added


 pam_constants.h   pam_constants.h 
/*- /*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc. * Copyright (c) 2002-2003 Networks Associates Technology, Inc.
* Copyright (c) 2004-2007 Dag-Erling Smørgrav
* All rights reserved. * All rights reserved.
* *
* This software was developed for the FreeBSD Project by ThinkSec AS and * This software was developed for the FreeBSD Project by ThinkSec AS and
* Network Associates Laboratories, the Security Research Division of * Network Associates Laboratories, the Security Research Division of
* Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
* ("CBOSS"), as part of the DARPA CHATS research program. * ("CBOSS"), as part of the DARPA CHATS research program.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
skipping to change at line 34 skipping to change at line 35
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO SE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO SE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI AL * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI AL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI CT * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI CT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WA Y * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WA Y
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $P4: //depot/projects/openpam/include/security/pam_constants.h#22 $ * $Id: pam_constants.h 408 2007-12-21 11:36:24Z des $
*/ */
#ifndef _PAM_CONSTANTS_H_INCLUDED #ifndef SECURITY_PAM_CONSTANTS_H_INCLUDED
#define _PAM_CONSTANTS_H_INCLUDED #define SECURITY_PAM_CONSTANTS_H_INCLUDED
#include <security/openpam_version.h> #include <security/openpam_version.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* /*
* XSSO 5.2 * XSSO 5.2
*/ */
skipping to change at line 135 skipping to change at line 136
PAM_REPOSITORY = 10, PAM_REPOSITORY = 10,
PAM_AUTHTOK_PROMPT = 11, /* OpenPAM extension */ PAM_AUTHTOK_PROMPT = 11, /* OpenPAM extension */
PAM_OLDAUTHTOK_PROMPT = 12, /* OpenPAM extension */ PAM_OLDAUTHTOK_PROMPT = 12, /* OpenPAM extension */
PAM_NUM_ITEMS /* OpenPAM extension */ PAM_NUM_ITEMS /* OpenPAM extension */
}; };
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif /* !SECURITY_PAM_CONSTANTS_H_INCLUDED */
 End of changes. 4 change blocks. 
3 lines changed or deleted 4 lines changed or added


 pam_modules.h   pam_modules.h 
/*- /*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc. * Copyright (c) 2002-2003 Networks Associates Technology, Inc.
* Copyright (c) 2004-2007 Dag-Erling Smørgrav
* All rights reserved. * All rights reserved.
* *
* This software was developed for the FreeBSD Project by ThinkSec AS and * This software was developed for the FreeBSD Project by ThinkSec AS and
* Network Associates Laboratories, the Security Research Division of * Network Associates Laboratories, the Security Research Division of
* Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
* ("CBOSS"), as part of the DARPA CHATS research program. * ("CBOSS"), as part of the DARPA CHATS research program.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
skipping to change at line 34 skipping to change at line 35
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO SE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO SE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI AL * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI AL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI CT * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI CT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WA Y * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WA Y
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $P4: //depot/projects/openpam/include/security/pam_modules.h#9 $ * $Id: pam_modules.h 408 2007-12-21 11:36:24Z des $
*/ */
#ifndef _PAM_MODULES_H_INCLUDED #ifndef SECURITY_PAM_MODULES_H_INCLUDED
#define _PAM_MODULES_H_INCLUDED #define SECURITY_PAM_MODULES_H_INCLUDED
#include <security/pam_types.h> #include <security/pam_types.h>
#include <security/pam_constants.h> #include <security/pam_constants.h>
#include <security/openpam.h> #include <security/openpam.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* /*
skipping to change at line 160 skipping to change at line 161
char *_target_authn_domain, char *_target_authn_domain,
int _argc, int _argc,
const char **_argv); const char **_argv);
#endif /* 0 */ #endif /* 0 */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif /* !SECURITY_PAM_MODULES_H_INCLUDED */
 End of changes. 4 change blocks. 
3 lines changed or deleted 4 lines changed or added


 pam_types.h   pam_types.h 
/*- /*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc. * Copyright (c) 2002-2003 Networks Associates Technology, Inc.
* Copyright (c) 2004-2007 Dag-Erling Smørgrav
* All rights reserved. * All rights reserved.
* *
* This software was developed for the FreeBSD Project by ThinkSec AS and * This software was developed for the FreeBSD Project by ThinkSec AS and
* Network Associates Laboratories, the Security Research Division of * Network Associates Laboratories, the Security Research Division of
* Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
* ("CBOSS"), as part of the DARPA CHATS research program. * ("CBOSS"), as part of the DARPA CHATS research program.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
skipping to change at line 34 skipping to change at line 35
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO SE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO SE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI AL * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTI AL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI CT * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI CT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WA Y * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WA Y
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $P4: //depot/projects/openpam/include/security/pam_types.h#13 $ * $Id: pam_types.h 408 2007-12-21 11:36:24Z des $
*/ */
#ifndef _PAM_TYPES_H_INCLUDED #ifndef SECURITY_PAM_TYPES_H_INCLUDED
#define _PAM_TYPES_H_INCLUDED #define SECURITY_PAM_TYPES_H_INCLUDED
#include <stddef.h> #include <stddef.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* /*
* XSSO 5.1.1 * XSSO 5.1.1
*/ */
skipping to change at line 80 skipping to change at line 81
*/ */
struct pam_handle; struct pam_handle;
typedef struct pam_handle pam_handle_t; typedef struct pam_handle pam_handle_t;
/* /*
* Solaris 9 * Solaris 9
*/ */
typedef struct pam_repository { typedef struct pam_repository {
char *type; char *type;
void *scope; void *scope;
size_t scope_len; size_t scope_len;
} pam_repository_t; } pam_repository_t;
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif /* !SECURITY_PAM_TYPES_H_INCLUDED */
 End of changes. 5 change blocks. 
4 lines changed or deleted 5 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/