Vendor import of OpenPAM Cinnamon.

This commit is contained in:
Dag-Erling Smørgrav 2002-05-02 04:40:21 +00:00
parent c7070155fc
commit ac7e3b9d95
53 changed files with 283 additions and 131 deletions

View File

@ -1,13 +1,37 @@
============================================================================
OpenPAM Cinnamon 2002-05-02
- ENHANCE: Add a null conversation function, openpam_nullconv().
- BUGFIX: Various markup bugs in the documentation.
- BUGFIX: Document <security/openpam.h>.
- BUGFIX: Duplicate expansion of openpam_log() macro arguments.
- ENHANCE: Restructure the policy-loading code and align our use of
the "other" policy with Solaris and Linux-PAM.
- ENHANCE: Log dlopen() and dlsym() failures.
- ENHANCE: In openpam_ttyconv(), emit a newline after error and info
messages unless the message contains one already.
- BUGFIX: In pam_vprompt(), initialize the response pointer to NULL
so we can detect whether the conversation function touched it.
============================================================================
OpenPAM Cineraria 2002-04-14
- BUGFIX: Fix confusion between token and prompt in
pam_get_authtok(3).
- ENHANCE: Improved documentation.
- ENHANCE: Adopt the same preprocessor tricks that were used in
FreeBSD's version of Linux-PAM to simplify static linking without
requiring dummy primitives.
- ENHANCE: move the policy-loading code out of pam_start.c.
- ENHANCE: Move the policy-loading code out of pam_start.c.
- BUGFIX: Fix typo in one of the versions of the openpam_log macro.
@ -128,4 +152,4 @@ OpenPAM Calamite 2002-02-09
First (beta) release.
============================================================================
$P4: //depot/projects/openpam/HISTORY#9 $
$P4: //depot/projects/openpam/HISTORY#11 $

View File

@ -1,5 +1,5 @@
#
# $P4: //depot/projects/openpam/MANIFEST#7 $
# $P4: //depot/projects/openpam/MANIFEST#8 $
#
CREDITS
HISTORY
@ -70,6 +70,7 @@ lib/openpam_get_option.c
lib/openpam_impl.h
lib/openpam_load.c
lib/openpam_log.c
lib/openpam_nullconv.c
lib/openpam_restore_cred.c
lib/openpam_set_option.c
lib/openpam_static.c

View File

@ -1,12 +1,12 @@
Release notes for OpenPAM Cineraria
===================================
Release notes for OpenPAM Cinnamon
==================================
The library itself is complete. Documentation exists in the form of
man pages for the library functions, though a few pages are still
incomplete.
This release is incorporated into FreeBSD-CURRENT as of 2002-04-14.
This release is incorporated into FreeBSD-CURRENT as of 2002-05-02.
It has also been successfully built on NetBSD, and should build with
minimal or no changes on OpenBSD. It has not been tested on any other
OS.
@ -15,4 +15,4 @@ Known issues:
- The documentation is still incomplete.
$P4: //depot/projects/openpam/RELNOTES#9 $
$P4: //depot/projects/openpam/RELNOTES#10 $

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/openpam_borrow_cred.3#2 $
.\" $P4: //depot/projects/openpam/doc/man/openpam_borrow_cred.3#4 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt OPENPAM_BORROW_CRED 3
.Os
.Sh NAME
@ -43,6 +43,7 @@
.Lb libpam
.Sh SYNOPSIS
.In security/pam_appl.h
.In security/openpam.h
.Ft int
.Fn openpam_borrow_cred "pam_handle_t *pamh" "const struct passwd *pwd"
.Sh DESCRIPTION

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/openpam_free_data.3#2 $
.\" $P4: //depot/projects/openpam/doc/man/openpam_free_data.3#4 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt OPENPAM_FREE_DATA 3
.Os
.Sh NAME
@ -43,6 +43,7 @@
.Lb libpam
.Sh SYNOPSIS
.In security/pam_appl.h
.In security/openpam.h
.Ft void
.Fn openpam_free_data "pam_handle_t *pamh" "void *data" "int status"
.Sh DESCRIPTION

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/openpam_get_option.3#6 $
.\" $P4: //depot/projects/openpam/doc/man/openpam_get_option.3#8 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt OPENPAM_GET_OPTION 3
.Os
.Sh NAME
@ -43,6 +43,7 @@
.Lb libpam
.Sh SYNOPSIS
.In security/pam_appl.h
.In security/openpam.h
.Ft const char *
.Fn openpam_get_option "pam_handle_t *pamh" "const char *option"
.Sh DESCRIPTION

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/openpam_log.3#7 $
.\" $P4: //depot/projects/openpam/doc/man/openpam_log.3#9 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt OPENPAM_LOG 3
.Os
.Sh NAME
@ -43,6 +43,7 @@
.Lb libpam
.Sh SYNOPSIS
.In security/pam_appl.h
.In security/openpam.h
.Ft void
.Fn openpam_log "int level" "const char *fmt" "..."
.Sh DESCRIPTION

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/openpam_restore_cred.3#2 $
.\" $P4: //depot/projects/openpam/doc/man/openpam_restore_cred.3#4 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt OPENPAM_RESTORE_CRED 3
.Os
.Sh NAME
@ -43,6 +43,7 @@
.Lb libpam
.Sh SYNOPSIS
.In security/pam_appl.h
.In security/openpam.h
.Ft int
.Fn openpam_restore_cred "pam_handle_t *pamh"
.Sh DESCRIPTION

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/openpam_set_option.3#6 $
.\" $P4: //depot/projects/openpam/doc/man/openpam_set_option.3#8 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt OPENPAM_SET_OPTION 3
.Os
.Sh NAME
@ -43,6 +43,7 @@
.Lb libpam
.Sh SYNOPSIS
.In security/pam_appl.h
.In security/openpam.h
.Ft int
.Fn openpam_set_option "pam_handle_t *pamh" "const char *option" "const char *value"
.Sh DESCRIPTION

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/openpam_ttyconv.3#7 $
.\" $P4: //depot/projects/openpam/doc/man/openpam_ttyconv.3#9 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt OPENPAM_TTYCONV 3
.Os
.Sh NAME
@ -43,6 +43,7 @@
.Lb libpam
.Sh SYNOPSIS
.In security/pam_appl.h
.In security/openpam.h
.Ft int
.Fn openpam_ttyconv "int n" "const struct pam_message **msg" "struct pam_response **resp" "void *data"
.Sh DESCRIPTION

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam.3#13 $
.\" $P4: //depot/projects/openpam/doc/man/pam.3#14 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_acct_mgmt.3#11 $
.\" $P4: //depot/projects/openpam/doc/man/pam_acct_mgmt.3#12 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_ACCT_MGMT 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_authenticate.3#11 $
.\" $P4: //depot/projects/openpam/doc/man/pam_authenticate.3#12 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_AUTHENTICATE 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_chauthtok.3#11 $
.\" $P4: //depot/projects/openpam/doc/man/pam_chauthtok.3#12 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_CHAUTHTOK 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_close_session.3#11 $
.\" $P4: //depot/projects/openpam/doc/man/pam_close_session.3#12 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_CLOSE_SESSION 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_end.3#11 $
.\" $P4: //depot/projects/openpam/doc/man/pam_end.3#12 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_END 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_error.3#11 $
.\" $P4: //depot/projects/openpam/doc/man/pam_error.3#12 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_ERROR 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_get_authtok.3#13 $
.\" $P4: //depot/projects/openpam/doc/man/pam_get_authtok.3#14 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_GET_AUTHTOK 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_get_data.3#11 $
.\" $P4: //depot/projects/openpam/doc/man/pam_get_data.3#12 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_GET_DATA 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_get_item.3#12 $
.\" $P4: //depot/projects/openpam/doc/man/pam_get_item.3#13 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_GET_ITEM 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_get_user.3#12 $
.\" $P4: //depot/projects/openpam/doc/man/pam_get_user.3#13 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_GET_USER 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_getenv.3#11 $
.\" $P4: //depot/projects/openpam/doc/man/pam_getenv.3#12 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_GETENV 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_getenvlist.3#12 $
.\" $P4: //depot/projects/openpam/doc/man/pam_getenvlist.3#13 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_GETENVLIST 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_info.3#11 $
.\" $P4: //depot/projects/openpam/doc/man/pam_info.3#12 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_INFO 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_open_session.3#11 $
.\" $P4: //depot/projects/openpam/doc/man/pam_open_session.3#12 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_OPEN_SESSION 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_prompt.3#12 $
.\" $P4: //depot/projects/openpam/doc/man/pam_prompt.3#13 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_PROMPT 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_putenv.3#11 $
.\" $P4: //depot/projects/openpam/doc/man/pam_putenv.3#12 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_PUTENV 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_set_data.3#11 $
.\" $P4: //depot/projects/openpam/doc/man/pam_set_data.3#12 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_SET_DATA 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_set_item.3#11 $
.\" $P4: //depot/projects/openpam/doc/man/pam_set_item.3#12 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_SET_ITEM 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_setcred.3#12 $
.\" $P4: //depot/projects/openpam/doc/man/pam_setcred.3#13 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_SETCRED 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_setenv.3#11 $
.\" $P4: //depot/projects/openpam/doc/man/pam_setenv.3#12 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_SETENV 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_sm_acct_mgmt.3#7 $
.\" $P4: //depot/projects/openpam/doc/man/pam_sm_acct_mgmt.3#8 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_SM_ACCT_MGMT 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_sm_authenticate.3#7 $
.\" $P4: //depot/projects/openpam/doc/man/pam_sm_authenticate.3#8 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_SM_AUTHENTICATE 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_sm_chauthtok.3#7 $
.\" $P4: //depot/projects/openpam/doc/man/pam_sm_chauthtok.3#8 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_SM_CHAUTHTOK 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_sm_close_session.3#7 $
.\" $P4: //depot/projects/openpam/doc/man/pam_sm_close_session.3#8 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_SM_CLOSE_SESSION 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_sm_open_session.3#7 $
.\" $P4: //depot/projects/openpam/doc/man/pam_sm_open_session.3#8 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_SM_OPEN_SESSION 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_sm_setcred.3#7 $
.\" $P4: //depot/projects/openpam/doc/man/pam_sm_setcred.3#8 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_SM_SETCRED 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_start.3#12 $
.\" $P4: //depot/projects/openpam/doc/man/pam_start.3#13 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_START 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_strerror.3#11 $
.\" $P4: //depot/projects/openpam/doc/man/pam_strerror.3#12 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_STRERROR 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_verror.3#9 $
.\" $P4: //depot/projects/openpam/doc/man/pam_verror.3#10 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_VERROR 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_vinfo.3#9 $
.\" $P4: //depot/projects/openpam/doc/man/pam_vinfo.3#10 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_VINFO 3
.Os
.Sh NAME

View File

@ -31,9 +31,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $P4: //depot/projects/openpam/doc/man/pam_vprompt.3#9 $
.\" $P4: //depot/projects/openpam/doc/man/pam_vprompt.3#10 $
.\"
.Dd April 14, 2002
.Dd May 2, 2002
.Dt PAM_VPROMPT 3
.Os
.Sh NAME

View File

@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $P4: //depot/projects/openpam/include/security/openpam.h#18 $
* $P4: //depot/projects/openpam/include/security/openpam.h#19 $
*/
#ifndef _SECURITY_OPENPAM_H_INCLUDED
@ -163,6 +163,14 @@ int openpam_ttyconv(int _n,
struct pam_response **_resp,
void *_data);
/*
* Null conversation function
*/
int openpam_nullconv(int _n,
const struct pam_message **_msg,
struct pam_response **_resp,
void *_data);
/*
* PAM primitives
*/

View File

@ -31,7 +31,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $P4: //depot/projects/openpam/lib/Makefile#14 $
# $P4: //depot/projects/openpam/lib/Makefile#15 $
#
LIB = pam
@ -53,6 +53,7 @@ SRCS += openpam_free_data.c
SRCS += openpam_get_option.c
SRCS += openpam_load.c
SRCS += openpam_log.c
SRCS += openpam_nullconv.c
SRCS += openpam_restore_cred.c
SRCS += openpam_set_option.c
SRCS += openpam_static.c

View File

@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $P4: //depot/projects/openpam/lib/openpam_configure.c#1 $
* $P4: //depot/projects/openpam/lib/openpam_configure.c#2 $
*/
#include <ctype.h>
@ -50,7 +50,7 @@
#define MAX_OPTIONS 256
static int
openpam_read_policy_file(pam_handle_t *pamh,
openpam_read_policy_file(pam_chain_t *policy[],
const char *service,
const char *filename,
int style)
@ -186,7 +186,7 @@ openpam_read_policy_file(pam_handle_t *pamh,
* Finally, add the module at the end of the
* appropriate chain and bump the counter.
*/
r = openpam_add_module(pamh, chain, flag, p, optc, optv);
r = openpam_add_module(policy, chain, flag, p, optc, optv);
if (r != PAM_SUCCESS)
return (-r);
++n;
@ -214,14 +214,8 @@ static const char *openpam_policy_path[] = {
NULL
};
/*
* OpenPAM internal
*
* Configure a service
*/
int
openpam_configure(pam_handle_t *pamh,
static int
openpam_load_policy(pam_chain_t *policy[],
const char *service)
{
const char **path;
@ -235,24 +229,62 @@ openpam_configure(pam_handle_t *pamh,
filename = malloc(len + strlen(service) + 1);
if (filename == NULL) {
openpam_log(PAM_LOG_ERROR, "malloc(): %m");
return (PAM_BUF_ERR);
return (-PAM_BUF_ERR);
}
strcpy(filename, *path);
strcat(filename, service);
r = openpam_read_policy_file(pamh,
r = openpam_read_policy_file(policy,
service, filename, PAM_D_STYLE);
free(filename);
} else {
r = openpam_read_policy_file(pamh,
r = openpam_read_policy_file(policy,
service, *path, PAM_CONF_STYLE);
}
if (r < 0)
return (-r);
if (r > 0)
return (PAM_SUCCESS);
if (r != 0)
return (r);
}
return (PAM_SYSTEM_ERR);
return (0);
}
/*
* OpenPAM internal
*
* Configure a service
*/
int
openpam_configure(pam_handle_t *pamh,
const char *service)
{
pam_chain_t *other[PAM_NUM_CHAINS];
int i, n, r;
/* try own configuration first */
r = openpam_load_policy(pamh->chains, service);
if (r < 0)
return (-r);
for (i = n = 0; i < PAM_NUM_CHAINS; ++i) {
if (pamh->chains[i] != NULL)
++n;
}
if (n == PAM_NUM_CHAINS)
return (PAM_SUCCESS);
/* fill in the blanks with "other" */
openpam_load_policy(other, PAM_OTHER);
if (r < 0)
return (-r);
for (i = n = 0; i < PAM_NUM_CHAINS; ++i) {
if (pamh->chains[i] == NULL) {
pamh->chains[i] = other[i];
other[i] = NULL;
}
if (pamh->chains[i] != NULL)
++n;
}
openpam_clear_chains(other);
return (n > 0 ? PAM_SUCCESS : PAM_SYSTEM_ERR);
}
/*

View File

@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $P4: //depot/projects/openpam/lib/openpam_dynamic.c#4 $
* $P4: //depot/projects/openpam/lib/openpam_dynamic.c#5 $
*/
#include <dlfcn.h>
@ -80,7 +80,7 @@ openpam_dynamic(const char *path)
module->func[i] = dlsym(dlh, _pam_sm_func_name[i]);
if (module->func[i] == NULL)
openpam_log(PAM_LOG_DEBUG, "%s: %s(): %s",
vpath, _pam_sm_func_name[i], dlerror());
path, _pam_sm_func_name[i], dlerror());
}
return (module);
buf_err:

View File

@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $P4: //depot/projects/openpam/lib/openpam_impl.h#13 $
* $P4: //depot/projects/openpam/lib/openpam_impl.h#14 $
*/
#ifndef _OPENPAM_IMPL_H_INCLUDED
@ -108,9 +108,9 @@ struct pam_saved_cred {
int openpam_configure(pam_handle_t *, const char *);
int openpam_dispatch(pam_handle_t *, int, int);
int openpam_findenv(pam_handle_t *, const char *, size_t);
int openpam_add_module(pam_handle_t *, int, int,
int openpam_add_module(pam_chain_t **, int, int,
const char *, int, const char **);
void openpam_clear_chains(pam_handle_t *);
void openpam_clear_chains(pam_chain_t **);
#ifdef OPENPAM_STATIC_MODULES
pam_module_t *openpam_static(const char *);

View File

@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $P4: //depot/projects/openpam/lib/openpam_load.c#12 $
* $P4: //depot/projects/openpam/lib/openpam_load.c#13 $
*/
#include <dlfcn.h>
@ -156,7 +156,7 @@ openpam_destroy_chain(pam_chain_t *chain)
*/
int
openpam_add_module(pam_handle_t *pamh,
openpam_add_module(pam_chain_t *policy[],
int chain,
int flag,
const char *modpath,
@ -178,12 +178,12 @@ openpam_add_module(pam_handle_t *pamh,
openpam_destroy_chain(new);
return (PAM_OPEN_ERR);
}
if ((iterator = pamh->chains[chain]) != NULL) {
if ((iterator = policy[chain]) != NULL) {
while (iterator->next != NULL)
iterator = iterator->next;
iterator->next = new;
} else {
pamh->chains[chain] = new;
policy[chain] = new;
}
return (PAM_SUCCESS);
@ -199,12 +199,12 @@ openpam_add_module(pam_handle_t *pamh,
*/
void
openpam_clear_chains(pam_handle_t *pamh)
openpam_clear_chains(pam_chain_t *policy[])
{
int i;
for (i = 0; i < PAM_NUM_CHAINS; ++i)
openpam_destroy_chain(pamh->chains[i]);
openpam_destroy_chain(policy[i]);
}
/*

View File

@ -0,0 +1,68 @@
/*-
* Copyright (c) 2002 Networks Associates Technology, Inc.
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
* NAI Labs, the Security Research Division of Network Associates, Inc.
* under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
* DARPA CHATS research program.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $P4: //depot/projects/openpam/lib/openpam_nullconv.c#1 $
*/
#include <sys/types.h>
#include <security/pam_appl.h>
#include <security/openpam.h>
/*
* OpenPAM extension
*
* Null conversation function
*/
int
openpam_nullconv(int n,
const struct pam_message **msg,
struct pam_response **resp,
void *data)
{
(void)n;
(void)msg;
(void)resp;
(void)data;
return (PAM_CONV_ERR);
}
/*
* NOLIST
*
* Error codes:
*
* PAM_CONV_ERR
*/

View File

@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $P4: //depot/projects/openpam/lib/pam_end.c#8 $
* $P4: //depot/projects/openpam/lib/pam_end.c#9 $
*/
#include <stdlib.h>
@ -72,7 +72,7 @@ pam_end(pam_handle_t *pamh,
free(pamh->env);
/* clear chains */
openpam_clear_chains(pamh);
openpam_clear_chains(pamh->chains);
/* clear items */
for (i = 0; i < PAM_NUM_ITEMS; ++i)

View File

@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $P4: //depot/projects/openpam/lib/pam_get_authtok.c#16 $
* $P4: //depot/projects/openpam/lib/pam_get_authtok.c#17 $
*/
#include <sys/param.h>
@ -145,10 +145,10 @@ pam_get_authtok(pam_handle_t *pamh,
*
* The =item argument must have one of the following values:
*
* =PAM_AUTHTOK
* =PAM_AUTHTOK:
* Returns the current authentication token, or the new token
* when changing authentication tokens.
* =PAM_OLDAUTHTOK
* =PAM_OLDAUTHTOK:
* Returns the previous authentication token when changing
* authentication tokens.
*

View File

@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $P4: //depot/projects/openpam/lib/pam_start.c#13 $
* $P4: //depot/projects/openpam/lib/pam_start.c#14 $
*/
#include <stdlib.h>
@ -66,8 +66,6 @@ pam_start(const char *service,
goto fail;
r = openpam_configure(ph, service);
if (r != PAM_SUCCESS && r != PAM_BUF_ERR)
r = openpam_configure(ph, PAM_OTHER);
if (r != PAM_SUCCESS)
goto fail;

View File

@ -32,7 +32,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $P4: //depot/projects/openpam/misc/gendoc.pl#10 $
# $P4: //depot/projects/openpam/misc/gendoc.pl#13 $
#
use strict;
@ -139,6 +139,7 @@ sub parse_source($) {
$argnames =~ s/([\|\[\]\(\)\.\*\+\?])/\\$1/g;
$argnames =~ s/\" \"/|/g;
$argnames =~ s/^\"(.*)\"$/($1)/;
$inliteral = $inlist = 0;
foreach (split("\n", $source)) {
s/\s*$//;
if (!defined($man)) {
@ -185,7 +186,7 @@ sub parse_source($) {
$inlist = 0;
} elsif ($inliteral && m/^\S/) {
$man .= ".Ed\n";
$inlist = 0;
$inliteral = 0;
} elsif ($inliteral) {
$man .= "$_\n";
next;
@ -211,10 +212,17 @@ sub parse_source($) {
$man .= "$_\n";
}
if (defined($man)) {
if ($inlist) {
$man .= ".El\n";
}
if ($inliteral) {
$man .= ".Ed\n";
}
$man =~ s/(\n\.[A-Z][a-z] [\w ]+)\n([\.,:;-]\S*)\s*/$1 $2\n/gs;
$man =~ s/\s*$/\n/gm;
$man =~ s/\n+/\n/gs;
$man =~ s/\0//gs;
$man =~ s/\n\n\./\n\./gs;
chomp($man);
} else {
$man = "No description available.";
@ -307,6 +315,9 @@ sub gendoc($) {
if ($func->{'name'} =~ m/_sm_/) {
$mdoc .= ".In security/pam_modules.h\n"
}
if ($func->{'name'} =~ m/openpam/) {
$mdoc .= ".In security/openpam.h\n"
}
$mdoc .= ".Ft $func->{'type'}
.Fn $func->{'name'} $func->{'args'}
.Sh DESCRIPTION
@ -366,10 +377,12 @@ as part of the DARPA CHATS research program.
";
$fn = "$func->{'name'}.3";
sysopen(FILE, $fn, O_RDWR|O_CREAT|O_TRUNC)
or die("$fn: open(): $!\n");
print(FILE $mdoc);
close(FILE);
if (sysopen(FILE, $fn, O_RDWR|O_CREAT|O_TRUNC)) {
print(FILE $mdoc);
close(FILE);
} else {
warn("$fn: open(): $!\n");
}
}
sub gensummary() {