aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--HISTORY20
-rw-r--r--Makefile.am2
-rw-r--r--Makefile.in4
-rw-r--r--RELNOTES4
-rwxr-xr-xautogen.sh2
-rw-r--r--bin/Makefile.am2
-rw-r--r--bin/Makefile.in2
-rw-r--r--bin/openpam_dump_policy/Makefile.am2
-rw-r--r--bin/openpam_dump_policy/Makefile.in2
-rw-r--r--bin/openpam_dump_policy/openpam_dump_policy.c2
-rw-r--r--bin/pamtest/Makefile.am2
-rw-r--r--bin/pamtest/Makefile.in2
-rw-r--r--bin/pamtest/pamtest.16
-rw-r--r--bin/pamtest/pamtest.c2
-rw-r--r--bin/su/Makefile.am2
-rw-r--r--bin/su/Makefile.in2
-rw-r--r--bin/su/su.16
-rw-r--r--bin/su/su.c2
-rwxr-xr-xconfigure22
-rw-r--r--configure.ac6
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/Makefile.in2
-rw-r--r--doc/man/Makefile.am2
-rw-r--r--doc/man/Makefile.in2
-rw-r--r--doc/man/openpam.34
-rw-r--r--doc/man/openpam.man2
-rw-r--r--doc/man/openpam_borrow_cred.36
-rw-r--r--doc/man/openpam_free_data.34
-rw-r--r--doc/man/openpam_free_envlist.34
-rw-r--r--doc/man/openpam_get_feature.310
-rw-r--r--doc/man/openpam_get_option.34
-rw-r--r--doc/man/openpam_log.34
-rw-r--r--doc/man/openpam_nullconv.36
-rw-r--r--doc/man/openpam_readline.34
-rw-r--r--doc/man/openpam_readlinev.34
-rw-r--r--doc/man/openpam_readword.34
-rw-r--r--doc/man/openpam_restore_cred.36
-rw-r--r--doc/man/openpam_set_feature.310
-rw-r--r--doc/man/openpam_set_option.36
-rw-r--r--doc/man/openpam_straddch.34
-rw-r--r--doc/man/openpam_subst.38
-rw-r--r--doc/man/openpam_ttyconv.36
-rw-r--r--doc/man/pam.312
-rw-r--r--doc/man/pam.conf.56
-rw-r--r--doc/man/pam.man2
-rw-r--r--doc/man/pam_acct_mgmt.36
-rw-r--r--doc/man/pam_authenticate.312
-rw-r--r--doc/man/pam_chauthtok.312
-rw-r--r--doc/man/pam_close_session.312
-rw-r--r--doc/man/pam_conv.36
-rw-r--r--doc/man/pam_end.312
-rw-r--r--doc/man/pam_error.36
-rw-r--r--doc/man/pam_get_authtok.310
-rw-r--r--doc/man/pam_get_data.36
-rw-r--r--doc/man/pam_get_item.310
-rw-r--r--doc/man/pam_get_user.38
-rw-r--r--doc/man/pam_getenv.34
-rw-r--r--doc/man/pam_getenvlist.34
-rw-r--r--doc/man/pam_info.36
-rw-r--r--doc/man/pam_open_session.312
-rw-r--r--doc/man/pam_prompt.36
-rw-r--r--doc/man/pam_putenv.36
-rw-r--r--doc/man/pam_set_data.36
-rw-r--r--doc/man/pam_set_item.312
-rw-r--r--doc/man/pam_setcred.312
-rw-r--r--doc/man/pam_setenv.36
-rw-r--r--doc/man/pam_sm_acct_mgmt.36
-rw-r--r--doc/man/pam_sm_authenticate.36
-rw-r--r--doc/man/pam_sm_chauthtok.36
-rw-r--r--doc/man/pam_sm_close_session.36
-rw-r--r--doc/man/pam_sm_open_session.36
-rw-r--r--doc/man/pam_sm_setcred.36
-rw-r--r--doc/man/pam_start.38
-rw-r--r--doc/man/pam_strerror.34
-rw-r--r--doc/man/pam_verror.36
-rw-r--r--doc/man/pam_vinfo.36
-rw-r--r--doc/man/pam_vprompt.36
-rw-r--r--include/Makefile.am2
-rw-r--r--include/Makefile.in2
-rw-r--r--include/security/Makefile.am2
-rw-r--r--include/security/Makefile.in2
-rw-r--r--include/security/openpam.h2
-rw-r--r--include/security/openpam_attr.h2
-rw-r--r--include/security/openpam_version.h8
-rw-r--r--include/security/pam_appl.h7
-rw-r--r--include/security/pam_constants.h8
-rw-r--r--include/security/pam_modules.h2
-rw-r--r--include/security/pam_types.h2
-rw-r--r--lib/Makefile.am2
-rw-r--r--lib/Makefile.in2
-rw-r--r--lib/libpam/Makefile.am2
-rw-r--r--lib/libpam/Makefile.in2
-rw-r--r--lib/libpam/openpam_asprintf.c2
-rw-r--r--lib/libpam/openpam_asprintf.h2
-rw-r--r--lib/libpam/openpam_borrow_cred.c2
-rw-r--r--lib/libpam/openpam_check_owner_perms.c2
-rw-r--r--lib/libpam/openpam_configure.c2
-rw-r--r--lib/libpam/openpam_constants.c174
-rw-r--r--lib/libpam/openpam_constants.h5
-rw-r--r--lib/libpam/openpam_cred.h2
-rw-r--r--lib/libpam/openpam_ctype.h2
-rw-r--r--lib/libpam/openpam_debug.h2
-rw-r--r--lib/libpam/openpam_dispatch.c6
-rw-r--r--lib/libpam/openpam_dlfunc.h2
-rw-r--r--lib/libpam/openpam_dynamic.c2
-rw-r--r--lib/libpam/openpam_features.c2
-rw-r--r--lib/libpam/openpam_features.h2
-rw-r--r--lib/libpam/openpam_findenv.c4
-rw-r--r--lib/libpam/openpam_free_data.c2
-rw-r--r--lib/libpam/openpam_free_envlist.c2
-rw-r--r--lib/libpam/openpam_get_feature.c8
-rw-r--r--lib/libpam/openpam_get_option.c2
-rw-r--r--lib/libpam/openpam_impl.h4
-rw-r--r--lib/libpam/openpam_load.c2
-rw-r--r--lib/libpam/openpam_log.c2
-rw-r--r--lib/libpam/openpam_nullconv.c2
-rw-r--r--lib/libpam/openpam_readline.c2
-rw-r--r--lib/libpam/openpam_readlinev.c2
-rw-r--r--lib/libpam/openpam_readword.c4
-rw-r--r--lib/libpam/openpam_restore_cred.c2
-rw-r--r--lib/libpam/openpam_set_feature.c8
-rw-r--r--lib/libpam/openpam_set_option.c2
-rw-r--r--lib/libpam/openpam_static.c2
-rw-r--r--lib/libpam/openpam_straddch.c2
-rw-r--r--lib/libpam/openpam_strlcat.c2
-rw-r--r--lib/libpam/openpam_strlcat.h2
-rw-r--r--lib/libpam/openpam_strlcmp.h2
-rw-r--r--lib/libpam/openpam_strlcpy.c2
-rw-r--r--lib/libpam/openpam_strlcpy.h2
-rw-r--r--lib/libpam/openpam_strlset.c2
-rw-r--r--lib/libpam/openpam_strlset.h2
-rw-r--r--lib/libpam/openpam_subst.c2
-rw-r--r--lib/libpam/openpam_ttyconv.c2
-rw-r--r--lib/libpam/openpam_vasprintf.c2
-rw-r--r--lib/libpam/openpam_vasprintf.h2
-rw-r--r--lib/libpam/pam_acct_mgmt.c2
-rw-r--r--lib/libpam/pam_authenticate.c10
-rw-r--r--lib/libpam/pam_authenticate_secondary.c2
-rw-r--r--lib/libpam/pam_chauthtok.c10
-rw-r--r--lib/libpam/pam_close_session.c10
-rw-r--r--lib/libpam/pam_end.c12
-rw-r--r--lib/libpam/pam_error.c2
-rw-r--r--lib/libpam/pam_get_authtok.c5
-rw-r--r--lib/libpam/pam_get_data.c4
-rw-r--r--lib/libpam/pam_get_item.c8
-rw-r--r--lib/libpam/pam_get_mapped_authtok.c2
-rw-r--r--lib/libpam/pam_get_mapped_username.c2
-rw-r--r--lib/libpam/pam_get_user.c2
-rw-r--r--lib/libpam/pam_getenv.c4
-rw-r--r--lib/libpam/pam_getenvlist.c8
-rw-r--r--lib/libpam/pam_info.c2
-rw-r--r--lib/libpam/pam_open_session.c10
-rw-r--r--lib/libpam/pam_prompt.c2
-rw-r--r--lib/libpam/pam_putenv.c4
-rw-r--r--lib/libpam/pam_set_data.c4
-rw-r--r--lib/libpam/pam_set_item.c11
-rw-r--r--lib/libpam/pam_set_mapped_authtok.c2
-rw-r--r--lib/libpam/pam_set_mapped_username.c2
-rw-r--r--lib/libpam/pam_setcred.c10
-rw-r--r--lib/libpam/pam_setenv.c4
-rw-r--r--lib/libpam/pam_sm_acct_mgmt.c2
-rw-r--r--lib/libpam/pam_sm_authenticate.c2
-rw-r--r--lib/libpam/pam_sm_authenticate_secondary.c2
-rw-r--r--lib/libpam/pam_sm_chauthtok.c2
-rw-r--r--lib/libpam/pam_sm_close_session.c2
-rw-r--r--lib/libpam/pam_sm_get_mapped_authtok.c2
-rw-r--r--lib/libpam/pam_sm_get_mapped_username.c2
-rw-r--r--lib/libpam/pam_sm_open_session.c2
-rw-r--r--lib/libpam/pam_sm_set_mapped_authtok.c2
-rw-r--r--lib/libpam/pam_sm_set_mapped_username.c2
-rw-r--r--lib/libpam/pam_sm_setcred.c2
-rw-r--r--lib/libpam/pam_start.c2
-rw-r--r--lib/libpam/pam_strerror.c70
-rw-r--r--lib/libpam/pam_verror.c2
-rw-r--r--lib/libpam/pam_vinfo.c2
-rw-r--r--lib/libpam/pam_vprompt.c2
-rw-r--r--misc/gendoc.pl42
-rw-r--r--mkpkgng.in2
-rw-r--r--modules/Makefile.am2
-rw-r--r--modules/Makefile.in2
-rw-r--r--modules/pam_deny/Makefile.am2
-rw-r--r--modules/pam_deny/Makefile.in2
-rw-r--r--modules/pam_deny/pam_deny.c2
-rw-r--r--modules/pam_permit/Makefile.am2
-rw-r--r--modules/pam_permit/Makefile.in2
-rw-r--r--modules/pam_permit/pam_permit.c2
-rw-r--r--modules/pam_return/Makefile.am2
-rw-r--r--modules/pam_return/Makefile.in2
-rw-r--r--modules/pam_return/pam_return.c2
-rw-r--r--modules/pam_unix/Makefile.am2
-rw-r--r--modules/pam_unix/Makefile.in2
-rw-r--r--modules/pam_unix/pam_unix.c2
-rw-r--r--t/Makefile.am2
-rw-r--r--t/Makefile.in2
-rw-r--r--t/t_openpam_ctype.c6
-rw-r--r--t/t_openpam_dispatch.c28
-rw-r--r--t/t_openpam_readlinev.c20
-rw-r--r--t/t_openpam_readword.c23
-rw-r--r--t/t_pam_conv.c12
-rw-r--r--t/t_pam_conv.h2
200 files changed, 651 insertions, 538 deletions
diff --git a/HISTORY b/HISTORY
index 12efa5564bd4..bfcc4726652f 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,3 +1,23 @@
+OpenPAM Resedacea 2017-04-30
+
+ - BUGFIX: Reinstore the NULL check in pam_end(3) which was removed in
+ OpenPAM Radula, as it breaks common error-handling constructs.
+
+ - BUGFIX: Return PAM_SYMBOL_ERR instead of PAM_SYSTEM_ERR from the
+ dispatcher when the required service function could not be found.
+
+ - ENHANCE: Introduce the PAM_BAD_HANDLE error code for when pamh is
+ NULL in API functions that have a NULL check.
+
+ - ENHANCE: Introduce the PAM_BAD_ITEM, PAM_BAD_FEATURE and
+ PAM_BAD_CONSTANT error codes for situations where we previously
+ incorrectly used PAM_SYMBOL_ERR to denote that an invalid constant
+ had been passed to an API function.
+
+ - ENHANCE: Improve the RETURN VALUES section in API man pages,
+ especially for functions that cannot fail, which were incorrectly
+ documented as returning -1 on failure.
+============================================================================
OpenPAM Radula 2017-02-19
- BUGFIX: Fix an inverted test which prevented pam_get_authtok(3) and
diff --git a/Makefile.am b/Makefile.am
index a716d6cf024c..6355cefcd5bc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 917 2017-02-18 14:45:27Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
ACLOCAL_AMFLAGS = -I m4
diff --git a/Makefile.in b/Makefile.in
index b70b7895112e..80b8f14d1131 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am 917 2017-02-18 14:45:27Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
@@ -165,7 +165,7 @@ CSCOPE = cscope
DIST_SUBDIRS = misc include lib bin modules doc t
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(srcdir)/mkpkgng.in INSTALL README TODO compile config.guess \
- config.sub depcomp install-sh ltmain.sh missing
+ config.sub install-sh ltmain.sh missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
diff --git a/RELNOTES b/RELNOTES
index 87511047f0de..23b159a29366 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -1,6 +1,6 @@
- Release notes for OpenPAM Radula
- ================================
+ Release notes for OpenPAM Resedacea
+ ===================================
OpenPAM is developed primarily on FreeBSD, but is expected to work on
almost any POSIX-like platform that has GNU autotools, GNU make and
diff --git a/autogen.sh b/autogen.sh
index 469ee1159b37..4573429d4ee9 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $Id: autogen.sh 814 2014-09-12 07:46:46Z des $
+# $OpenPAM: autogen.sh 938 2017-04-30 21:34:42Z des $
#
libtoolize --copy --force
diff --git a/bin/Makefile.am b/bin/Makefile.am
index 4e24efb26fdc..ce57b7a74ab7 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 907 2017-01-18 09:39:01Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
SUBDIRS = openpam_dump_policy
diff --git a/bin/Makefile.in b/bin/Makefile.in
index d381ec35cb16..24ccda7b7865 100644
--- a/bin/Makefile.in
+++ b/bin/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am 907 2017-01-18 09:39:01Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
diff --git a/bin/openpam_dump_policy/Makefile.am b/bin/openpam_dump_policy/Makefile.am
index 23f61df0c771..3769cd124610 100644
--- a/bin/openpam_dump_policy/Makefile.am
+++ b/bin/openpam_dump_policy/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 834 2014-10-28 10:25:58Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/libpam
diff --git a/bin/openpam_dump_policy/Makefile.in b/bin/openpam_dump_policy/Makefile.in
index 24296379d57f..bf89f6e5e878 100644
--- a/bin/openpam_dump_policy/Makefile.in
+++ b/bin/openpam_dump_policy/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am 834 2014-10-28 10:25:58Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
VPATH = @srcdir@
am__is_gnu_make = { \
diff --git a/bin/openpam_dump_policy/openpam_dump_policy.c b/bin/openpam_dump_policy/openpam_dump_policy.c
index 8047005d1862..fc78100fb581 100644
--- a/bin/openpam_dump_policy/openpam_dump_policy.c
+++ b/bin/openpam_dump_policy/openpam_dump_policy.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_dump_policy.c 890 2016-01-11 16:22:09Z des $
+ * $OpenPAM: openpam_dump_policy.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/bin/pamtest/Makefile.am b/bin/pamtest/Makefile.am
index 7d2c7357544f..b490fab8f6ae 100644
--- a/bin/pamtest/Makefile.am
+++ b/bin/pamtest/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 834 2014-10-28 10:25:58Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
AM_CPPFLAGS = -I$(top_srcdir)/include
diff --git a/bin/pamtest/Makefile.in b/bin/pamtest/Makefile.in
index f5080e6dd518..6659af8a3ef5 100644
--- a/bin/pamtest/Makefile.in
+++ b/bin/pamtest/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am 834 2014-10-28 10:25:58Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
VPATH = @srcdir@
am__is_gnu_make = { \
diff --git a/bin/pamtest/pamtest.1 b/bin/pamtest/pamtest.1
index 3eee8bfd1dd1..0b142abe0777 100644
--- a/bin/pamtest/pamtest.1
+++ b/bin/pamtest/pamtest.1
@@ -1,5 +1,5 @@
.\"-
-.\" Copyright (c) 2011 Dag-Erling Smørgrav
+.\" Copyright (c) 2011-2017 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -26,9 +26,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: pamtest.1 924 2017-02-19 20:52:28Z des $
+.\" $OpenPAM: pamtest.1 939 2017-04-30 21:36:50Z des $
.\"
-.Dd February 19, 2017
+.Dd April 30, 2017
.Dt PAMTEST 1
.Os
.Sh NAME
diff --git a/bin/pamtest/pamtest.c b/bin/pamtest/pamtest.c
index e67bf7766f90..3eb0768774d0 100644
--- a/bin/pamtest/pamtest.c
+++ b/bin/pamtest/pamtest.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pamtest.c 685 2013-07-11 16:33:34Z des $
+ * $OpenPAM: pamtest.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/bin/su/Makefile.am b/bin/su/Makefile.am
index 0f95c001f8ad..c9f3b23bb33b 100644
--- a/bin/su/Makefile.am
+++ b/bin/su/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 834 2014-10-28 10:25:58Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
AM_CPPFLAGS = -I$(top_srcdir)/include
diff --git a/bin/su/Makefile.in b/bin/su/Makefile.in
index 6cb42e98874d..82e6f99bc83e 100644
--- a/bin/su/Makefile.in
+++ b/bin/su/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am 834 2014-10-28 10:25:58Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
VPATH = @srcdir@
am__is_gnu_make = { \
diff --git a/bin/su/su.1 b/bin/su/su.1
index 996fcba2766e..e6fceb061d46 100644
--- a/bin/su/su.1
+++ b/bin/su/su.1
@@ -1,5 +1,5 @@
.\"-
-.\" Copyright (c) 2011 Dag-Erling Smørgrav
+.\" Copyright (c) 2011-2017 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -26,9 +26,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: su.1 924 2017-02-19 20:52:28Z des $
+.\" $OpenPAM: su.1 939 2017-04-30 21:36:50Z des $
.\"
-.Dd February 19, 2017
+.Dd April 30, 2017
.Dt SU 1
.Os
.Sh NAME
diff --git a/bin/su/su.c b/bin/su/su.c
index 18a3cee75d37..cb83628f3c65 100644
--- a/bin/su/su.c
+++ b/bin/su/su.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: su.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: su.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/configure b/configure
index 703ae7649da2..49db637d1ed7 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
#! /bin/sh
-# From configure.ac Id: configure.ac 924 2017-02-19 20:52:28Z des .
+# From configure.ac OpenPAM: configure.ac 939 2017-04-30 21:36:50Z des .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for OpenPAM 20170219.
+# Generated by GNU Autoconf 2.69 for OpenPAM 20170430.
#
# Report bugs to <des@des.no>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='OpenPAM'
PACKAGE_TARNAME='openpam'
-PACKAGE_VERSION='20170219'
-PACKAGE_STRING='OpenPAM 20170219'
+PACKAGE_VERSION='20170430'
+PACKAGE_STRING='OpenPAM 20170430'
PACKAGE_BUGREPORT='des@des.no'
PACKAGE_URL='http://www.openpam.org/'
@@ -1345,7 +1345,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures OpenPAM 20170219 to adapt to many kinds of systems.
+\`configure' configures OpenPAM 20170430 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1415,7 +1415,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of OpenPAM 20170219:";;
+ short | recursive ) echo "Configuration of OpenPAM 20170430:";;
esac
cat <<\_ACEOF
@@ -1540,7 +1540,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-OpenPAM configure 20170219
+OpenPAM configure 20170430
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1909,7 +1909,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by OpenPAM $as_me 20170219, which was
+It was created by OpenPAM $as_me 20170430, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2774,7 +2774,7 @@ fi
# Define the identity of the package.
PACKAGE='openpam'
- VERSION='20170219'
+ VERSION='20170430'
cat >>confdefs.h <<_ACEOF
@@ -13577,7 +13577,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by OpenPAM $as_me 20170219, which was
+This file was extended by OpenPAM $as_me 20170430, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -13644,7 +13644,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-OpenPAM config.status 20170219
+OpenPAM config.status 20170430
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 88feebc5394f..57a8b9d02aa3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,8 @@
-dnl $Id: configure.ac 924 2017-02-19 20:52:28Z des $
+dnl $OpenPAM: configure.ac 939 2017-04-30 21:36:50Z des $
AC_PREREQ([2.62])
-AC_REVISION([$Id: configure.ac 924 2017-02-19 20:52:28Z des $])
-AC_INIT([OpenPAM], [20170219], [des@des.no], [openpam], [http://www.openpam.org/])
+AC_REVISION([$OpenPAM: configure.ac 939 2017-04-30 21:36:50Z des $])
+AC_INIT([OpenPAM], [20170430], [des@des.no], [openpam], [http://www.openpam.org/])
AC_CONFIG_SRCDIR([lib/libpam/pam_start.c])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign])
diff --git a/doc/Makefile.am b/doc/Makefile.am
index cb9f04a1f6fe..62b1f3518d44 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,3 +1,3 @@
-# $Id: Makefile.am 648 2013-03-05 17:54:27Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
SUBDIRS = man
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 21da50599f8e..5a310ff1d982 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am 648 2013-03-05 17:54:27Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index b1a8133f0c35..a5431bcd1979 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 907 2017-01-18 09:39:01Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
NULL =
diff --git a/doc/man/Makefile.in b/doc/man/Makefile.in
index 797058bad7aa..14c1db300436 100644
--- a/doc/man/Makefile.in
+++ b/doc/man/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am 907 2017-01-18 09:39:01Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
diff --git a/doc/man/openpam.3 b/doc/man/openpam.3
index 78ec8db0aafe..4c39ffe3483f 100644
--- a/doc/man/openpam.3
+++ b/doc/man/openpam.3
@@ -1,5 +1,5 @@
.\" Generated by gendoc.pl
-.Dd February 19, 2017
+.Dd April 30, 2017
.Dt OPENPAM 3
.Os
.Sh NAME
@@ -81,7 +81,7 @@
.Ft "int"
.Fn pam_vprompt "const pam_handle_t *pamh" "int style" "char **resp" "const char *fmt" "va_list ap"
.\"
-.\" $Id: openpam.man 648 2013-03-05 17:54:27Z des $
+.\" $OpenPAM: openpam.man 938 2017-04-30 21:34:42Z des $
.\"
.Sh DESCRIPTION
These functions are OpenPAM extensions to the PAM API.
diff --git a/doc/man/openpam.man b/doc/man/openpam.man
index a7dd7f0a9ff8..251d41a97422 100644
--- a/doc/man/openpam.man
+++ b/doc/man/openpam.man
@@ -1,5 +1,5 @@
.\"
-.\" $Id: openpam.man 648 2013-03-05 17:54:27Z des $
+.\" $OpenPAM: openpam.man 938 2017-04-30 21:34:42Z des $
.\"
.Sh DESCRIPTION
These functions are OpenPAM extensions to the PAM API.
diff --git a/doc/man/openpam_borrow_cred.3 b/doc/man/openpam_borrow_cred.3
index bf25a475fbd6..687ad425ed6f 100644
--- a/doc/man/openpam_borrow_cred.3
+++ b/doc/man/openpam_borrow_cred.3
@@ -1,6 +1,6 @@
.\" Generated from openpam_borrow_cred.c by gendoc.pl
-.\" $Id: openpam_borrow_cred.c 649 2013-03-05 17:58:33Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: openpam_borrow_cred.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt OPENPAM_BORROW_CRED 3
.Os
.Sh NAME
@@ -29,6 +29,8 @@ The
.Fn openpam_borrow_cred
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_PERM_DENIED
diff --git a/doc/man/openpam_free_data.3 b/doc/man/openpam_free_data.3
index ca2fe51dfd92..a804c2a51579 100644
--- a/doc/man/openpam_free_data.3
+++ b/doc/man/openpam_free_data.3
@@ -1,6 +1,6 @@
.\" Generated from openpam_free_data.c by gendoc.pl
-.\" $Id: openpam_free_data.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: openpam_free_data.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt OPENPAM_FREE_DATA 3
.Os
.Sh NAME
diff --git a/doc/man/openpam_free_envlist.3 b/doc/man/openpam_free_envlist.3
index f8ed6f08e2c3..d069ba00407f 100644
--- a/doc/man/openpam_free_envlist.3
+++ b/doc/man/openpam_free_envlist.3
@@ -1,6 +1,6 @@
.\" Generated from openpam_free_envlist.c by gendoc.pl
-.\" $Id: openpam_free_envlist.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: openpam_free_envlist.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt OPENPAM_FREE_ENVLIST 3
.Os
.Sh NAME
diff --git a/doc/man/openpam_get_feature.3 b/doc/man/openpam_get_feature.3
index 45b6bcc91d69..daf49a4b63d1 100644
--- a/doc/man/openpam_get_feature.3
+++ b/doc/man/openpam_get_feature.3
@@ -1,6 +1,6 @@
.\" Generated from openpam_get_feature.c by gendoc.pl
-.\" $Id: openpam_get_feature.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: openpam_get_feature.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt OPENPAM_GET_FEATURE 3
.Os
.Sh NAME
@@ -50,8 +50,10 @@ The
.Fn openpam_get_feature
function returns one of the following values:
.Bl -tag -width 18n
-.It Bq Er PAM_SYMBOL_ERR
-Invalid symbol.
+.It Bq Er PAM_SUCCESS
+Success.
+.It Bq Er PAM_BAD_FEATURE
+Unrecognized or restricted feature.
.El
.Sh SEE ALSO
.Xr openpam_set_feature 3 ,
diff --git a/doc/man/openpam_get_option.3 b/doc/man/openpam_get_option.3
index fcfd9b83dd00..bdf73db9709c 100644
--- a/doc/man/openpam_get_option.3
+++ b/doc/man/openpam_get_option.3
@@ -1,6 +1,6 @@
.\" Generated from openpam_get_option.c by gendoc.pl
-.\" $Id: openpam_get_option.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: openpam_get_option.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt OPENPAM_GET_OPTION 3
.Os
.Sh NAME
diff --git a/doc/man/openpam_log.3 b/doc/man/openpam_log.3
index 0930abb17ccb..a761547fc434 100644
--- a/doc/man/openpam_log.3
+++ b/doc/man/openpam_log.3
@@ -1,6 +1,6 @@
.\" Generated from openpam_log.c by gendoc.pl
-.\" $Id: openpam_log.c 686 2013-07-11 16:36:02Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: openpam_log.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt OPENPAM_LOG 3
.Os
.Sh NAME
diff --git a/doc/man/openpam_nullconv.3 b/doc/man/openpam_nullconv.3
index 0ce1e44edead..7a8139ebe0ec 100644
--- a/doc/man/openpam_nullconv.3
+++ b/doc/man/openpam_nullconv.3
@@ -1,6 +1,6 @@
.\" Generated from openpam_nullconv.c by gendoc.pl
-.\" $Id: openpam_nullconv.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: openpam_nullconv.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt OPENPAM_NULLCONV 3
.Os
.Sh NAME
@@ -38,6 +38,8 @@ The
.Fn openpam_nullconv
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_CONV_ERR
Conversation failure.
.El
diff --git a/doc/man/openpam_readline.3 b/doc/man/openpam_readline.3
index db888ad97cfb..e33167d82e66 100644
--- a/doc/man/openpam_readline.3
+++ b/doc/man/openpam_readline.3
@@ -1,6 +1,6 @@
.\" Generated from openpam_readline.c by gendoc.pl
-.\" $Id: openpam_readline.c 703 2013-08-16 11:57:54Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: openpam_readline.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt OPENPAM_READLINE 3
.Os
.Sh NAME
diff --git a/doc/man/openpam_readlinev.3 b/doc/man/openpam_readlinev.3
index 9fb28e18cdee..6391ff50b417 100644
--- a/doc/man/openpam_readlinev.3
+++ b/doc/man/openpam_readlinev.3
@@ -1,6 +1,6 @@
.\" Generated from openpam_readlinev.c by gendoc.pl
-.\" $Id: openpam_readlinev.c 890 2016-01-11 16:22:09Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: openpam_readlinev.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt OPENPAM_READLINEV 3
.Os
.Sh NAME
diff --git a/doc/man/openpam_readword.3 b/doc/man/openpam_readword.3
index 8bb0f492d799..e7c8b0f9224b 100644
--- a/doc/man/openpam_readword.3
+++ b/doc/man/openpam_readword.3
@@ -1,6 +1,6 @@
.\" Generated from openpam_readword.c by gendoc.pl
-.\" $Id: openpam_readword.c 916 2017-02-07 12:25:58Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: openpam_readword.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt OPENPAM_READWORD 3
.Os
.Sh NAME
diff --git a/doc/man/openpam_restore_cred.3 b/doc/man/openpam_restore_cred.3
index 3b1c27e361a5..3319fd56b14b 100644
--- a/doc/man/openpam_restore_cred.3
+++ b/doc/man/openpam_restore_cred.3
@@ -1,6 +1,6 @@
.\" Generated from openpam_restore_cred.c by gendoc.pl
-.\" $Id: openpam_restore_cred.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: openpam_restore_cred.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt OPENPAM_RESTORE_CRED 3
.Os
.Sh NAME
@@ -23,6 +23,8 @@ The
.Fn openpam_restore_cred
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_NO_MODULE_DATA
Module data not found.
.It Bq Er PAM_SYSTEM_ERR
diff --git a/doc/man/openpam_set_feature.3 b/doc/man/openpam_set_feature.3
index bc5865096975..30774210df06 100644
--- a/doc/man/openpam_set_feature.3
+++ b/doc/man/openpam_set_feature.3
@@ -1,6 +1,6 @@
.\" Generated from openpam_set_feature.c by gendoc.pl
-.\" $Id: openpam_set_feature.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: openpam_set_feature.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt OPENPAM_SET_FEATURE 3
.Os
.Sh NAME
@@ -32,8 +32,10 @@ The
.Fn openpam_set_feature
function returns one of the following values:
.Bl -tag -width 18n
-.It Bq Er PAM_SYMBOL_ERR
-Invalid symbol.
+.It Bq Er PAM_SUCCESS
+Success.
+.It Bq Er PAM_BAD_FEATURE
+Unrecognized or restricted feature.
.El
.Sh SEE ALSO
.Xr openpam_get_feature 3 ,
diff --git a/doc/man/openpam_set_option.3 b/doc/man/openpam_set_option.3
index 8cb0a7c65f83..751c3177425e 100644
--- a/doc/man/openpam_set_option.3
+++ b/doc/man/openpam_set_option.3
@@ -1,6 +1,6 @@
.\" Generated from openpam_set_option.c by gendoc.pl
-.\" $Id: openpam_set_option.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: openpam_set_option.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt OPENPAM_SET_OPTION 3
.Os
.Sh NAME
@@ -23,6 +23,8 @@ The
.Fn openpam_set_option
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_SYSTEM_ERR
diff --git a/doc/man/openpam_straddch.3 b/doc/man/openpam_straddch.3
index 127858f637a6..5f67891c814e 100644
--- a/doc/man/openpam_straddch.3
+++ b/doc/man/openpam_straddch.3
@@ -1,6 +1,6 @@
.\" Generated from openpam_straddch.c by gendoc.pl
-.\" $Id: openpam_straddch.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: openpam_straddch.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt OPENPAM_STRADDCH 3
.Os
.Sh NAME
diff --git a/doc/man/openpam_subst.3 b/doc/man/openpam_subst.3
index 5c0c111e32ff..ce55577854d5 100644
--- a/doc/man/openpam_subst.3
+++ b/doc/man/openpam_subst.3
@@ -1,6 +1,6 @@
.\" Generated from openpam_subst.c by gendoc.pl
-.\" $Id: openpam_subst.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: openpam_subst.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt OPENPAM_SUBST 3
.Os
.Sh NAME
@@ -81,6 +81,10 @@ The
.Fn openpam_subst
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
+.It Bq Er PAM_BAD_ITEM
+Unrecognized or restricted item.
.It Bq Er PAM_TRY_AGAIN
Try again.
.El
diff --git a/doc/man/openpam_ttyconv.3 b/doc/man/openpam_ttyconv.3
index 6aeb9f3b3eeb..4be2cd698dff 100644
--- a/doc/man/openpam_ttyconv.3
+++ b/doc/man/openpam_ttyconv.3
@@ -1,6 +1,6 @@
.\" Generated from openpam_ttyconv.c by gendoc.pl
-.\" $Id: openpam_ttyconv.c 890 2016-01-11 16:22:09Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: openpam_ttyconv.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt OPENPAM_TTYCONV 3
.Os
.Sh NAME
@@ -32,6 +32,8 @@ The
.Fn openpam_ttyconv
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_CONV_ERR
diff --git a/doc/man/pam.3 b/doc/man/pam.3
index 5b46b6d3a8d0..7707e5dbf7af 100644
--- a/doc/man/pam.3
+++ b/doc/man/pam.3
@@ -1,5 +1,5 @@
.\" Generated by gendoc.pl
-.Dd February 19, 2017
+.Dd April 30, 2017
.Dt PAM 3
.Os
.Sh NAME
@@ -60,7 +60,7 @@
.Ft "const char *"
.Fn pam_strerror "const pam_handle_t *pamh" "int error_number"
.\"
-.\" $Id: pam.man 648 2013-03-05 17:54:27Z des $
+.\" $OpenPAM: pam.man 938 2017-04-30 21:34:42Z des $
.\"
.Sh DESCRIPTION
The Pluggable Authentication Modules (PAM) library abstracts a number
@@ -180,6 +180,14 @@ Authentication token lock busy.
Failed to recover old authentication token.
.It Bq Er PAM_AUTH_ERR
Authentication error.
+.It Bq Er PAM_BAD_CONSTANT
+Bad constant.
+.It Bq Er PAM_BAD_FEATURE
+Unrecognized or restricted feature.
+.It Bq Er PAM_BAD_HANDLE
+Invalid PAM handle.
+.It Bq Er PAM_BAD_ITEM
+Unrecognized or restricted item.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_CONV_ERR
diff --git a/doc/man/pam.conf.5 b/doc/man/pam.conf.5
index 64adb9d238a2..777e839ea2ca 100644
--- a/doc/man/pam.conf.5
+++ b/doc/man/pam.conf.5
@@ -1,5 +1,5 @@
.\"-
-.\" Copyright (c) 2005-2011 Dag-Erling Smørgrav
+.\" Copyright (c) 2005-2017 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -26,9 +26,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: pam.conf.5 924 2017-02-19 20:52:28Z des $
+.\" $OpenPAM: pam.conf.5 939 2017-04-30 21:36:50Z des $
.\"
-.Dd February 19, 2017
+.Dd April 30, 2017
.Dt PAM.CONF 5
.Os
.Sh NAME
diff --git a/doc/man/pam.man b/doc/man/pam.man
index 24c5d3242499..16873f57de64 100644
--- a/doc/man/pam.man
+++ b/doc/man/pam.man
@@ -1,5 +1,5 @@
.\"
-.\" $Id: pam.man 648 2013-03-05 17:54:27Z des $
+.\" $OpenPAM: pam.man 938 2017-04-30 21:34:42Z des $
.\"
.Sh DESCRIPTION
The Pluggable Authentication Modules (PAM) library abstracts a number
diff --git a/doc/man/pam_acct_mgmt.3 b/doc/man/pam_acct_mgmt.3
index b6d2d4f0fa5a..bd32933f3721 100644
--- a/doc/man/pam_acct_mgmt.3
+++ b/doc/man/pam_acct_mgmt.3
@@ -1,6 +1,6 @@
.\" Generated from pam_acct_mgmt.c by gendoc.pl
-.\" $Id: pam_acct_mgmt.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_acct_mgmt.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_ACCT_MGMT 3
.Os
.Sh NAME
@@ -37,6 +37,8 @@ The
.Fn pam_acct_mgmt
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_ABORT
General failure.
.It Bq Er PAM_ACCT_EXPIRED
diff --git a/doc/man/pam_authenticate.3 b/doc/man/pam_authenticate.3
index 46a9994c6800..2701172abe58 100644
--- a/doc/man/pam_authenticate.3
+++ b/doc/man/pam_authenticate.3
@@ -1,6 +1,6 @@
.\" Generated from pam_authenticate.c by gendoc.pl
-.\" $Id: pam_authenticate.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_authenticate.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_AUTHENTICATE 3
.Os
.Sh NAME
@@ -41,18 +41,22 @@ Fail if the user's authentication token is null.
If any other bits are set,
.Fn pam_authenticate
will return
-.Dv PAM_SYMBOL_ERR .
+.Dv PAM_BAD_CONSTANT .
.Sh RETURN VALUES
The
.Fn pam_authenticate
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_ABORT
General failure.
.It Bq Er PAM_AUTHINFO_UNAVAIL
Authentication information is unavailable.
.It Bq Er PAM_AUTH_ERR
Authentication error.
+.It Bq Er PAM_BAD_CONSTANT
+Bad constant.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_CONV_ERR
@@ -65,8 +69,6 @@ Maximum number of tries exceeded.
Permission denied.
.It Bq Er PAM_SERVICE_ERR
Error in service module.
-.It Bq Er PAM_SYMBOL_ERR
-Invalid symbol.
.It Bq Er PAM_SYSTEM_ERR
System error.
.It Bq Er PAM_USER_UNKNOWN
diff --git a/doc/man/pam_chauthtok.3 b/doc/man/pam_chauthtok.3
index 63a53e618e8f..89b7416db8dc 100644
--- a/doc/man/pam_chauthtok.3
+++ b/doc/man/pam_chauthtok.3
@@ -1,6 +1,6 @@
.\" Generated from pam_chauthtok.c by gendoc.pl
-.\" $Id: pam_chauthtok.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_chauthtok.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_CHAUTHTOK 3
.Os
.Sh NAME
@@ -33,12 +33,14 @@ Change only those authentication tokens that have expired.
If any other bits are set,
.Fn pam_chauthtok
will return
-.Dv PAM_SYMBOL_ERR .
+.Dv PAM_BAD_CONSTANT .
.Sh RETURN VALUES
The
.Fn pam_chauthtok
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_ABORT
General failure.
.It Bq Er PAM_AUTHTOK_DISABLE_AGING
@@ -49,6 +51,8 @@ Authentication token failure.
Authentication token lock busy.
.It Bq Er PAM_AUTHTOK_RECOVERY_ERR
Failed to recover old authentication token.
+.It Bq Er PAM_BAD_CONSTANT
+Bad constant.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_CONV_ERR
@@ -57,8 +61,6 @@ Conversation failure.
Permission denied.
.It Bq Er PAM_SERVICE_ERR
Error in service module.
-.It Bq Er PAM_SYMBOL_ERR
-Invalid symbol.
.It Bq Er PAM_SYSTEM_ERR
System error.
.It Bq Er PAM_TRY_AGAIN
diff --git a/doc/man/pam_close_session.3 b/doc/man/pam_close_session.3
index 3d9ed399fad1..749d2199f21c 100644
--- a/doc/man/pam_close_session.3
+++ b/doc/man/pam_close_session.3
@@ -1,6 +1,6 @@
.\" Generated from pam_close_session.c by gendoc.pl
-.\" $Id: pam_close_session.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_close_session.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_CLOSE_SESSION 3
.Os
.Sh NAME
@@ -30,14 +30,18 @@ Do not emit any messages.
If any other bits are set,
.Fn pam_close_session
will return
-.Dv PAM_SYMBOL_ERR .
+.Dv PAM_BAD_CONSTANT .
.Sh RETURN VALUES
The
.Fn pam_close_session
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_ABORT
General failure.
+.It Bq Er PAM_BAD_CONSTANT
+Bad constant.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_CONV_ERR
@@ -48,8 +52,6 @@ Permission denied.
Error in service module.
.It Bq Er PAM_SESSION_ERR
Session failure.
-.It Bq Er PAM_SYMBOL_ERR
-Invalid symbol.
.It Bq Er PAM_SYSTEM_ERR
System error.
.El
diff --git a/doc/man/pam_conv.3 b/doc/man/pam_conv.3
index dcf34a25bffd..bbf0a572cbe7 100644
--- a/doc/man/pam_conv.3
+++ b/doc/man/pam_conv.3
@@ -1,6 +1,6 @@
.\"-
.\" Copyright (c) 2002-2003 Networks Associates Technology, Inc.
-.\" Copyright (c) 2004-2014 Dag-Erling Smørgrav
+.\" Copyright (c) 2004-2017 Dag-Erling Smørgrav
.\" All rights reserved.
.\"
.\" This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: pam_conv.3 924 2017-02-19 20:52:28Z des $
+.\" $OpenPAM: pam_conv.3 939 2017-04-30 21:36:50Z des $
.\"
-.Dd February 19, 2017
+.Dd April 30, 2017
.Dt PAM_CONV 3
.Os
.Sh NAME
diff --git a/doc/man/pam_end.3 b/doc/man/pam_end.3
index 80ff655d3ad8..af4cbecffe62 100644
--- a/doc/man/pam_end.3
+++ b/doc/man/pam_end.3
@@ -1,6 +1,6 @@
.\" Generated from pam_end.c by gendoc.pl
-.\" $Id: pam_end.c 913 2017-01-21 15:11:12Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_end.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_END 3
.Os
.Sh NAME
@@ -25,7 +25,13 @@ last API call before the call to
.Sh RETURN VALUES
The
.Fn pam_end
-function returns 0 on success and -1 on failure.
+function returns one of the following values:
+.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
+.It Bq Er PAM_BAD_HANDLE
+Invalid PAM handle.
+.El
.Sh SEE ALSO
.Xr pam 3 ,
.Xr pam_strerror 3
diff --git a/doc/man/pam_error.3 b/doc/man/pam_error.3
index de63c1ec02c8..cf3445ea906a 100644
--- a/doc/man/pam_error.3
+++ b/doc/man/pam_error.3
@@ -1,6 +1,6 @@
.\" Generated from pam_error.c by gendoc.pl
-.\" $Id: pam_error.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_error.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_ERROR 3
.Os
.Sh NAME
@@ -22,6 +22,8 @@ The
.Fn pam_error
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_CONV_ERR
diff --git a/doc/man/pam_get_authtok.3 b/doc/man/pam_get_authtok.3
index dab3de823305..bedeffbe033c 100644
--- a/doc/man/pam_get_authtok.3
+++ b/doc/man/pam_get_authtok.3
@@ -1,6 +1,6 @@
.\" Generated from pam_get_authtok.c by gendoc.pl
-.\" $Id: pam_get_authtok.c 913 2017-01-21 15:11:12Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_get_authtok.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_GET_AUTHTOK 3
.Os
.Sh NAME
@@ -121,6 +121,12 @@ The
.Fn pam_get_authtok
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
+.It Bq Er PAM_BAD_CONSTANT
+Bad constant.
+.It Bq Er PAM_BAD_ITEM
+Unrecognized or restricted item.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_CONV_ERR
diff --git a/doc/man/pam_get_data.3 b/doc/man/pam_get_data.3
index 35b3cd17cc13..104e25aeca96 100644
--- a/doc/man/pam_get_data.3
+++ b/doc/man/pam_get_data.3
@@ -1,6 +1,6 @@
.\" Generated from pam_get_data.c by gendoc.pl
-.\" $Id: pam_get_data.c 913 2017-01-21 15:11:12Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_get_data.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_GET_DATA 3
.Os
.Sh NAME
@@ -39,6 +39,8 @@ The
.Fn pam_get_data
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_NO_MODULE_DATA
Module data not found.
.El
diff --git a/doc/man/pam_get_item.3 b/doc/man/pam_get_item.3
index c53e9228346b..9f96e96b6407 100644
--- a/doc/man/pam_get_item.3
+++ b/doc/man/pam_get_item.3
@@ -1,6 +1,6 @@
.\" Generated from pam_get_item.c by gendoc.pl
-.\" $Id: pam_get_item.c 913 2017-01-21 15:11:12Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_get_item.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_GET_ITEM 3
.Os
.Sh NAME
@@ -74,8 +74,10 @@ The
.Fn pam_get_item
function returns one of the following values:
.Bl -tag -width 18n
-.It Bq Er PAM_SYMBOL_ERR
-Invalid symbol.
+.It Bq Er PAM_SUCCESS
+Success.
+.It Bq Er PAM_BAD_ITEM
+Unrecognized or restricted item.
.El
.Sh SEE ALSO
.Xr pam 3 ,
diff --git a/doc/man/pam_get_user.3 b/doc/man/pam_get_user.3
index 96c1af61dfd7..58a861d48075 100644
--- a/doc/man/pam_get_user.3
+++ b/doc/man/pam_get_user.3
@@ -1,6 +1,6 @@
.\" Generated from pam_get_user.c by gendoc.pl
-.\" $Id: pam_get_user.c 913 2017-01-21 15:11:12Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_get_user.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_GET_USER 3
.Os
.Sh NAME
@@ -66,6 +66,10 @@ The
.Fn pam_get_user
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
+.It Bq Er PAM_BAD_ITEM
+Unrecognized or restricted item.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_CONV_ERR
diff --git a/doc/man/pam_getenv.3 b/doc/man/pam_getenv.3
index d2dd7829bb26..dbbb484896f4 100644
--- a/doc/man/pam_getenv.3
+++ b/doc/man/pam_getenv.3
@@ -1,6 +1,6 @@
.\" Generated from pam_getenv.c by gendoc.pl
-.\" $Id: pam_getenv.c 914 2017-01-21 15:15:29Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_getenv.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_GETENV 3
.Os
.Sh NAME
diff --git a/doc/man/pam_getenvlist.3 b/doc/man/pam_getenvlist.3
index 9fa65e746983..29827cd53a32 100644
--- a/doc/man/pam_getenvlist.3
+++ b/doc/man/pam_getenvlist.3
@@ -1,6 +1,6 @@
.\" Generated from pam_getenvlist.c by gendoc.pl
-.\" $Id: pam_getenvlist.c 913 2017-01-21 15:11:12Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_getenvlist.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_GETENVLIST 3
.Os
.Sh NAME
diff --git a/doc/man/pam_info.3 b/doc/man/pam_info.3
index 5fe84b25d74a..5fd8d5f57195 100644
--- a/doc/man/pam_info.3
+++ b/doc/man/pam_info.3
@@ -1,6 +1,6 @@
.\" Generated from pam_info.c by gendoc.pl
-.\" $Id: pam_info.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_info.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_INFO 3
.Os
.Sh NAME
@@ -22,6 +22,8 @@ The
.Fn pam_info
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_CONV_ERR
diff --git a/doc/man/pam_open_session.3 b/doc/man/pam_open_session.3
index 052a17fe0f0a..dd026071edac 100644
--- a/doc/man/pam_open_session.3
+++ b/doc/man/pam_open_session.3
@@ -1,6 +1,6 @@
.\" Generated from pam_open_session.c by gendoc.pl
-.\" $Id: pam_open_session.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_open_session.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_OPEN_SESSION 3
.Os
.Sh NAME
@@ -31,14 +31,18 @@ Do not emit any messages.
If any other bits are set,
.Fn pam_open_session
will return
-.Dv PAM_SYMBOL_ERR .
+.Dv PAM_BAD_CONSTANT .
.Sh RETURN VALUES
The
.Fn pam_open_session
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_ABORT
General failure.
+.It Bq Er PAM_BAD_CONSTANT
+Bad constant.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_CONV_ERR
@@ -49,8 +53,6 @@ Permission denied.
Error in service module.
.It Bq Er PAM_SESSION_ERR
Session failure.
-.It Bq Er PAM_SYMBOL_ERR
-Invalid symbol.
.It Bq Er PAM_SYSTEM_ERR
System error.
.El
diff --git a/doc/man/pam_prompt.3 b/doc/man/pam_prompt.3
index d98696687f9c..b78ce3a41b41 100644
--- a/doc/man/pam_prompt.3
+++ b/doc/man/pam_prompt.3
@@ -1,6 +1,6 @@
.\" Generated from pam_prompt.c by gendoc.pl
-.\" $Id: pam_prompt.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_prompt.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_PROMPT 3
.Os
.Sh NAME
@@ -34,6 +34,8 @@ The
.Fn pam_prompt
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_CONV_ERR
diff --git a/doc/man/pam_putenv.3 b/doc/man/pam_putenv.3
index e177c584e28f..2be772ffec3f 100644
--- a/doc/man/pam_putenv.3
+++ b/doc/man/pam_putenv.3
@@ -1,6 +1,6 @@
.\" Generated from pam_putenv.c by gendoc.pl
-.\" $Id: pam_putenv.c 914 2017-01-21 15:15:29Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_putenv.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_PUTENV 3
.Os
.Sh NAME
@@ -25,6 +25,8 @@ The
.Fn pam_putenv
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_SYSTEM_ERR
diff --git a/doc/man/pam_set_data.3 b/doc/man/pam_set_data.3
index 8232740f3a7d..253d014877fc 100644
--- a/doc/man/pam_set_data.3
+++ b/doc/man/pam_set_data.3
@@ -1,6 +1,6 @@
.\" Generated from pam_set_data.c by gendoc.pl
-.\" $Id: pam_set_data.c 913 2017-01-21 15:11:12Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_set_data.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_SET_DATA 3
.Os
.Sh NAME
@@ -38,6 +38,8 @@ The
.Fn pam_set_data
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_SYSTEM_ERR
diff --git a/doc/man/pam_set_item.3 b/doc/man/pam_set_item.3
index 2165f5721538..3d479c92dd1d 100644
--- a/doc/man/pam_set_item.3
+++ b/doc/man/pam_set_item.3
@@ -1,6 +1,6 @@
.\" Generated from pam_set_item.c by gendoc.pl
-.\" $Id: pam_set_item.c 918 2017-02-19 17:46:22Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_set_item.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_SET_ITEM 3
.Os
.Sh NAME
@@ -30,12 +30,12 @@ The
.Fn pam_set_item
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
+.It Bq Er PAM_BAD_ITEM
+Unrecognized or restricted item.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
-.It Bq Er PAM_SYMBOL_ERR
-Invalid symbol.
-.It Bq Er PAM_SYSTEM_ERR
-System error.
.El
.Sh SEE ALSO
.Xr pam 3 ,
diff --git a/doc/man/pam_setcred.3 b/doc/man/pam_setcred.3
index 830043b024e8..fc5eaadc2b0c 100644
--- a/doc/man/pam_setcred.3
+++ b/doc/man/pam_setcred.3
@@ -1,6 +1,6 @@
.\" Generated from pam_setcred.c by gendoc.pl
-.\" $Id: pam_setcred.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_setcred.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_SETCRED 3
.Os
.Sh NAME
@@ -38,14 +38,18 @@ The latter four are mutually exclusive.
If any other bits are set,
.Fn pam_setcred
will return
-.Dv PAM_SYMBOL_ERR .
+.Dv PAM_BAD_CONSTANT .
.Sh RETURN VALUES
The
.Fn pam_setcred
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_ABORT
General failure.
+.It Bq Er PAM_BAD_CONSTANT
+Bad constant.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_CONV_ERR
@@ -60,8 +64,6 @@ Failed to retrieve user credentials.
Permission denied.
.It Bq Er PAM_SERVICE_ERR
Error in service module.
-.It Bq Er PAM_SYMBOL_ERR
-Invalid symbol.
.It Bq Er PAM_SYSTEM_ERR
System error.
.It Bq Er PAM_USER_UNKNOWN
diff --git a/doc/man/pam_setenv.3 b/doc/man/pam_setenv.3
index 09e9ec5532ac..8fced1e8cc5e 100644
--- a/doc/man/pam_setenv.3
+++ b/doc/man/pam_setenv.3
@@ -1,6 +1,6 @@
.\" Generated from pam_setenv.c by gendoc.pl
-.\" $Id: pam_setenv.c 914 2017-01-21 15:15:29Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_setenv.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_SETENV 3
.Os
.Sh NAME
@@ -25,6 +25,8 @@ The
.Fn pam_setenv
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_SYSTEM_ERR
diff --git a/doc/man/pam_sm_acct_mgmt.3 b/doc/man/pam_sm_acct_mgmt.3
index e28174f75395..2df56b5aa29a 100644
--- a/doc/man/pam_sm_acct_mgmt.3
+++ b/doc/man/pam_sm_acct_mgmt.3
@@ -1,6 +1,6 @@
.\" Generated from pam_sm_acct_mgmt.c by gendoc.pl
-.\" $Id: pam_sm_acct_mgmt.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_sm_acct_mgmt.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_SM_ACCT_MGMT 3
.Os
.Sh NAME
@@ -24,6 +24,8 @@ The
.Fn pam_sm_acct_mgmt
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_ABORT
General failure.
.It Bq Er PAM_ACCT_EXPIRED
diff --git a/doc/man/pam_sm_authenticate.3 b/doc/man/pam_sm_authenticate.3
index 3d7d0ce3014a..1dc6c69ca9b5 100644
--- a/doc/man/pam_sm_authenticate.3
+++ b/doc/man/pam_sm_authenticate.3
@@ -1,6 +1,6 @@
.\" Generated from pam_sm_authenticate.c by gendoc.pl
-.\" $Id: pam_sm_authenticate.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_sm_authenticate.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_SM_AUTHENTICATE 3
.Os
.Sh NAME
@@ -24,6 +24,8 @@ The
.Fn pam_sm_authenticate
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_ABORT
General failure.
.It Bq Er PAM_AUTHINFO_UNAVAIL
diff --git a/doc/man/pam_sm_chauthtok.3 b/doc/man/pam_sm_chauthtok.3
index 3905973fa7c8..be1baa8d5791 100644
--- a/doc/man/pam_sm_chauthtok.3
+++ b/doc/man/pam_sm_chauthtok.3
@@ -1,6 +1,6 @@
.\" Generated from pam_sm_chauthtok.c by gendoc.pl
-.\" $Id: pam_sm_chauthtok.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_sm_chauthtok.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_SM_CHAUTHTOK 3
.Os
.Sh NAME
@@ -34,6 +34,8 @@ The
.Fn pam_sm_chauthtok
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_ABORT
General failure.
.It Bq Er PAM_AUTHTOK_DISABLE_AGING
diff --git a/doc/man/pam_sm_close_session.3 b/doc/man/pam_sm_close_session.3
index d07ebf9aee6e..5b2034e15c7e 100644
--- a/doc/man/pam_sm_close_session.3
+++ b/doc/man/pam_sm_close_session.3
@@ -1,6 +1,6 @@
.\" Generated from pam_sm_close_session.c by gendoc.pl
-.\" $Id: pam_sm_close_session.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_sm_close_session.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_SM_CLOSE_SESSION 3
.Os
.Sh NAME
@@ -24,6 +24,8 @@ The
.Fn pam_sm_close_session
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_ABORT
General failure.
.It Bq Er PAM_BUF_ERR
diff --git a/doc/man/pam_sm_open_session.3 b/doc/man/pam_sm_open_session.3
index d4bb88ba7d1c..6b4ab9a409b3 100644
--- a/doc/man/pam_sm_open_session.3
+++ b/doc/man/pam_sm_open_session.3
@@ -1,6 +1,6 @@
.\" Generated from pam_sm_open_session.c by gendoc.pl
-.\" $Id: pam_sm_open_session.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_sm_open_session.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_SM_OPEN_SESSION 3
.Os
.Sh NAME
@@ -24,6 +24,8 @@ The
.Fn pam_sm_open_session
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_ABORT
General failure.
.It Bq Er PAM_BUF_ERR
diff --git a/doc/man/pam_sm_setcred.3 b/doc/man/pam_sm_setcred.3
index 0b0140fcabc7..cf1b76eb043b 100644
--- a/doc/man/pam_sm_setcred.3
+++ b/doc/man/pam_sm_setcred.3
@@ -1,6 +1,6 @@
.\" Generated from pam_sm_setcred.c by gendoc.pl
-.\" $Id: pam_sm_setcred.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_sm_setcred.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_SM_SETCRED 3
.Os
.Sh NAME
@@ -24,6 +24,8 @@ The
.Fn pam_sm_setcred
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_ABORT
General failure.
.It Bq Er PAM_BUF_ERR
diff --git a/doc/man/pam_start.3 b/doc/man/pam_start.3
index 72702cb7d827..7a2ba5bb8f2a 100644
--- a/doc/man/pam_start.3
+++ b/doc/man/pam_start.3
@@ -1,6 +1,6 @@
.\" Generated from pam_start.c by gendoc.pl
-.\" $Id: pam_start.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_start.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_START 3
.Os
.Sh NAME
@@ -45,6 +45,10 @@ The
.Fn pam_start
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
+.It Bq Er PAM_BAD_ITEM
+Unrecognized or restricted item.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_SYSTEM_ERR
diff --git a/doc/man/pam_strerror.3 b/doc/man/pam_strerror.3
index a6901fb8dfb9..bdfb1c2649c4 100644
--- a/doc/man/pam_strerror.3
+++ b/doc/man/pam_strerror.3
@@ -1,6 +1,6 @@
.\" Generated from pam_strerror.c by gendoc.pl
-.\" $Id: pam_strerror.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_strerror.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_STRERROR 3
.Os
.Sh NAME
diff --git a/doc/man/pam_verror.3 b/doc/man/pam_verror.3
index a4aff7e39674..ed680b72ad6b 100644
--- a/doc/man/pam_verror.3
+++ b/doc/man/pam_verror.3
@@ -1,6 +1,6 @@
.\" Generated from pam_verror.c by gendoc.pl
-.\" $Id: pam_verror.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_verror.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_VERROR 3
.Os
.Sh NAME
@@ -26,6 +26,8 @@ The
.Fn pam_verror
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_CONV_ERR
diff --git a/doc/man/pam_vinfo.3 b/doc/man/pam_vinfo.3
index b9f9d3f29e9b..a5923cb8573c 100644
--- a/doc/man/pam_vinfo.3
+++ b/doc/man/pam_vinfo.3
@@ -1,6 +1,6 @@
.\" Generated from pam_vinfo.c by gendoc.pl
-.\" $Id: pam_vinfo.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_vinfo.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_VINFO 3
.Os
.Sh NAME
@@ -26,6 +26,8 @@ The
.Fn pam_vinfo
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_CONV_ERR
diff --git a/doc/man/pam_vprompt.3 b/doc/man/pam_vprompt.3
index bd081fc776b3..4cfa9ed77dd1 100644
--- a/doc/man/pam_vprompt.3
+++ b/doc/man/pam_vprompt.3
@@ -1,6 +1,6 @@
.\" Generated from pam_vprompt.c by gendoc.pl
-.\" $Id: pam_vprompt.c 648 2013-03-05 17:54:27Z des $
-.Dd February 19, 2017
+.\" $OpenPAM: pam_vprompt.c 938 2017-04-30 21:34:42Z des $
+.Dd April 30, 2017
.Dt PAM_VPROMPT 3
.Os
.Sh NAME
@@ -60,6 +60,8 @@ The
.Fn pam_vprompt
function returns one of the following values:
.Bl -tag -width 18n
+.It Bq Er PAM_SUCCESS
+Success.
.It Bq Er PAM_BUF_ERR
Memory buffer error.
.It Bq Er PAM_CONV_ERR
diff --git a/include/Makefile.am b/include/Makefile.am
index 8a2755a7c88e..731c4a1ae1ff 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,3 +1,3 @@
-# $Id: Makefile.am 648 2013-03-05 17:54:27Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
SUBDIRS = security
diff --git a/include/Makefile.in b/include/Makefile.in
index a2464ca91140..3777407c6157 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am 648 2013-03-05 17:54:27Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
diff --git a/include/security/Makefile.am b/include/security/Makefile.am
index c3d10f32a08d..6f36694e02fe 100644
--- a/include/security/Makefile.am
+++ b/include/security/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 907 2017-01-18 09:39:01Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
securitydir = $(includedir)/security
diff --git a/include/security/Makefile.in b/include/security/Makefile.in
index 93cd98873048..8c1405037989 100644
--- a/include/security/Makefile.in
+++ b/include/security/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am 907 2017-01-18 09:39:01Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
VPATH = @srcdir@
am__is_gnu_make = { \
diff --git a/include/security/openpam.h b/include/security/openpam.h
index 77f0bb8eb719..1e7bc1ef44b2 100644
--- a/include/security/openpam.h
+++ b/include/security/openpam.h
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam.h 890 2016-01-11 16:22:09Z des $
+ * $OpenPAM: openpam.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef SECURITY_OPENPAM_H_INCLUDED
diff --git a/include/security/openpam_attr.h b/include/security/openpam_attr.h
index 2d88ae5f25a3..b07768139d4c 100644
--- a/include/security/openpam_attr.h
+++ b/include/security/openpam_attr.h
@@ -1,5 +1,5 @@
/*
- * $Id: openpam_attr.h 656 2013-03-06 22:58:45Z des $
+ * $OpenPAM: openpam_attr.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef SECURITY_OPENPAM_ATTR_H_INCLUDED
diff --git a/include/security/openpam_version.h b/include/security/openpam_version.h
index f10b6a945dea..9a2e1cb17a6e 100644
--- a/include/security/openpam_version.h
+++ b/include/security/openpam_version.h
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2014 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,14 +32,14 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_version.h 923 2017-02-19 19:31:16Z des $
+ * $OpenPAM: openpam_version.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef SECURITY_OPENPAM_VERSION_H_INCLUDED
#define SECURITY_OPENPAM_VERSION_H_INCLUDED
#define OPENPAM
-#define OPENPAM_VERSION 20170219
-#define OPENPAM_RELEASE "Radula"
+#define OPENPAM_VERSION 20170430
+#define OPENPAM_RELEASE "Resedacea"
#endif /* !SECURITY_OPENPAM_VERSION_H_INCLUDED */
diff --git a/include/security/pam_appl.h b/include/security/pam_appl.h
index 8edf897dfe7e..5f44d79555d9 100644
--- a/include/security/pam_appl.h
+++ b/include/security/pam_appl.h
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_appl.h 913 2017-01-21 15:11:12Z des $
+ * $OpenPAM: pam_appl.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef SECURITY_PAM_APPL_H_INCLUDED
@@ -72,8 +72,7 @@ pam_close_session(pam_handle_t *_pamh,
int
pam_end(pam_handle_t *_pamh,
- int _status)
- OPENPAM_NONNULL((1));
+ int _status);
int
pam_get_data(const pam_handle_t *_pamh,
diff --git a/include/security/pam_constants.h b/include/security/pam_constants.h
index ddd87ade41f6..a76dfecd2406 100644
--- a/include/security/pam_constants.h
+++ b/include/security/pam_constants.h
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_constants.h 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_constants.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef SECURITY_PAM_CONSTANTS_H_INCLUDED
@@ -78,6 +78,10 @@ enum {
PAM_TRY_AGAIN = 27,
PAM_MODULE_UNKNOWN = 28,
PAM_DOMAIN_UNKNOWN = 29,
+ PAM_BAD_HANDLE = 30, /* OpenPAM extension */
+ PAM_BAD_ITEM = 31, /* OpenPAM extension */
+ PAM_BAD_FEATURE = 32, /* OpenPAM extension */
+ PAM_BAD_CONSTANT = 33, /* OpenPAM extension */
PAM_NUM_ERRORS /* OpenPAM extension */
};
diff --git a/include/security/pam_modules.h b/include/security/pam_modules.h
index 7f1db465f039..a1e574515b55 100644
--- a/include/security/pam_modules.h
+++ b/include/security/pam_modules.h
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_modules.h 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_modules.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef SECURITY_PAM_MODULES_H_INCLUDED
diff --git a/include/security/pam_types.h b/include/security/pam_types.h
index fc834682a70c..fc5a06d6a4df 100644
--- a/include/security/pam_types.h
+++ b/include/security/pam_types.h
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_types.h 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_types.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef SECURITY_PAM_TYPES_H_INCLUDED
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 002d7bbddb1e..9f9fb5fa6212 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 907 2017-01-18 09:39:01Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
SUBDIRS =
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 74bf0a7d932d..ed2ff0f44813 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am 907 2017-01-18 09:39:01Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
diff --git a/lib/libpam/Makefile.am b/lib/libpam/Makefile.am
index faf0dd553f21..34d17d0cac68 100644
--- a/lib/libpam/Makefile.am
+++ b/lib/libpam/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 833 2014-10-28 09:03:41Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
NULL =
diff --git a/lib/libpam/Makefile.in b/lib/libpam/Makefile.in
index 7e73926685d4..c6e4b44f55c2 100644
--- a/lib/libpam/Makefile.in
+++ b/lib/libpam/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am 833 2014-10-28 09:03:41Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
VPATH = @srcdir@
diff --git a/lib/libpam/openpam_asprintf.c b/lib/libpam/openpam_asprintf.c
index 3169f4baa497..7b40aef28423 100644
--- a/lib/libpam/openpam_asprintf.c
+++ b/lib/libpam/openpam_asprintf.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_asprintf.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_asprintf.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_asprintf.h b/lib/libpam/openpam_asprintf.h
index 6d9e4e39826b..79680ad6e1bf 100644
--- a/lib/libpam/openpam_asprintf.h
+++ b/lib/libpam/openpam_asprintf.h
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_asprintf.h 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_asprintf.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef OPENPAM_ASPRINTF_H_INCLUDED
diff --git a/lib/libpam/openpam_borrow_cred.c b/lib/libpam/openpam_borrow_cred.c
index 1b407bdfd27b..79299ac4f1bc 100644
--- a/lib/libpam/openpam_borrow_cred.c
+++ b/lib/libpam/openpam_borrow_cred.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_borrow_cred.c 649 2013-03-05 17:58:33Z des $
+ * $OpenPAM: openpam_borrow_cred.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_check_owner_perms.c b/lib/libpam/openpam_check_owner_perms.c
index c8a598a9d448..0f99b82d2087 100644
--- a/lib/libpam/openpam_check_owner_perms.c
+++ b/lib/libpam/openpam_check_owner_perms.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_check_owner_perms.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_check_owner_perms.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_configure.c b/lib/libpam/openpam_configure.c
index e06eba2859dc..12f1a5163367 100644
--- a/lib/libpam/openpam_configure.c
+++ b/lib/libpam/openpam_configure.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_configure.c 890 2016-01-11 16:22:09Z des $
+ * $OpenPAM: openpam_configure.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_constants.c b/lib/libpam/openpam_constants.c
index 1cdd8101a88a..2b539e4fc765 100644
--- a/lib/libpam/openpam_constants.c
+++ b/lib/libpam/openpam_constants.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2001-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_constants.c 690 2013-08-15 13:22:51Z des $
+ * $OpenPAM: openpam_constants.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -44,86 +44,126 @@
#include "openpam_impl.h"
const char *pam_err_name[PAM_NUM_ERRORS] = {
- "PAM_SUCCESS",
- "PAM_OPEN_ERR",
- "PAM_SYMBOL_ERR",
- "PAM_SERVICE_ERR",
- "PAM_SYSTEM_ERR",
- "PAM_BUF_ERR",
- "PAM_CONV_ERR",
- "PAM_PERM_DENIED",
- "PAM_MAXTRIES",
- "PAM_AUTH_ERR",
- "PAM_NEW_AUTHTOK_REQD",
- "PAM_CRED_INSUFFICIENT",
- "PAM_AUTHINFO_UNAVAIL",
- "PAM_USER_UNKNOWN",
- "PAM_CRED_UNAVAIL",
- "PAM_CRED_EXPIRED",
- "PAM_CRED_ERR",
- "PAM_ACCT_EXPIRED",
- "PAM_AUTHTOK_EXPIRED",
- "PAM_SESSION_ERR",
- "PAM_AUTHTOK_ERR",
- "PAM_AUTHTOK_RECOVERY_ERR",
- "PAM_AUTHTOK_LOCK_BUSY",
- "PAM_AUTHTOK_DISABLE_AGING",
- "PAM_NO_MODULE_DATA",
- "PAM_IGNORE",
- "PAM_ABORT",
- "PAM_TRY_AGAIN",
- "PAM_MODULE_UNKNOWN",
- "PAM_DOMAIN_UNKNOWN"
+ [PAM_SUCCESS] = "PAM_SUCCESS",
+ [PAM_OPEN_ERR] = "PAM_OPEN_ERR",
+ [PAM_SYMBOL_ERR] = "PAM_SYMBOL_ERR",
+ [PAM_SERVICE_ERR] = "PAM_SERVICE_ERR",
+ [PAM_SYSTEM_ERR] = "PAM_SYSTEM_ERR",
+ [PAM_BUF_ERR] = "PAM_BUF_ERR",
+ [PAM_CONV_ERR] = "PAM_CONV_ERR",
+ [PAM_PERM_DENIED] = "PAM_PERM_DENIED",
+ [PAM_MAXTRIES] = "PAM_MAXTRIES",
+ [PAM_AUTH_ERR] = "PAM_AUTH_ERR",
+ [PAM_NEW_AUTHTOK_REQD] = "PAM_NEW_AUTHTOK_REQD",
+ [PAM_CRED_INSUFFICIENT] = "PAM_CRED_INSUFFICIENT",
+ [PAM_AUTHINFO_UNAVAIL] = "PAM_AUTHINFO_UNAVAIL",
+ [PAM_USER_UNKNOWN] = "PAM_USER_UNKNOWN",
+ [PAM_CRED_UNAVAIL] = "PAM_CRED_UNAVAIL",
+ [PAM_CRED_EXPIRED] = "PAM_CRED_EXPIRED",
+ [PAM_CRED_ERR] = "PAM_CRED_ERR",
+ [PAM_ACCT_EXPIRED] = "PAM_ACCT_EXPIRED",
+ [PAM_AUTHTOK_EXPIRED] = "PAM_AUTHTOK_EXPIRED",
+ [PAM_SESSION_ERR] = "PAM_SESSION_ERR",
+ [PAM_AUTHTOK_ERR] = "PAM_AUTHTOK_ERR",
+ [PAM_AUTHTOK_RECOVERY_ERR] = "PAM_AUTHTOK_RECOVERY_ERR",
+ [PAM_AUTHTOK_LOCK_BUSY] = "PAM_AUTHTOK_LOCK_BUSY",
+ [PAM_AUTHTOK_DISABLE_AGING] = "PAM_AUTHTOK_DISABLE_AGING",
+ [PAM_NO_MODULE_DATA] = "PAM_NO_MODULE_DATA",
+ [PAM_IGNORE] = "PAM_IGNORE",
+ [PAM_ABORT] = "PAM_ABORT",
+ [PAM_TRY_AGAIN] = "PAM_TRY_AGAIN",
+ [PAM_MODULE_UNKNOWN] = "PAM_MODULE_UNKNOWN",
+ [PAM_DOMAIN_UNKNOWN] = "PAM_DOMAIN_UNKNOWN",
+ [PAM_BAD_HANDLE] = "PAM_BAD_HANDLE",
+ [PAM_BAD_ITEM] = "PAM_BAD_ITEM",
+ [PAM_BAD_FEATURE] = "PAM_BAD_FEATURE",
+ [PAM_BAD_CONSTANT] = "PAM_BAD_CONSTANT",
+};
+
+const char *pam_err_text[PAM_NUM_ERRORS] = {
+ [PAM_SUCCESS] = "Success",
+ [PAM_OPEN_ERR] = "Failed to load module",
+ [PAM_SYMBOL_ERR] = "Invalid symbol",
+ [PAM_SERVICE_ERR] = "Error in service module",
+ [PAM_SYSTEM_ERR] = "System error",
+ [PAM_BUF_ERR] = "Memory buffer error",
+ [PAM_CONV_ERR] = "Conversation failure",
+ [PAM_PERM_DENIED] = "Permission denied",
+ [PAM_MAXTRIES] = "Maximum number of tries exceeded",
+ [PAM_AUTH_ERR] = "Authentication error",
+ [PAM_NEW_AUTHTOK_REQD] = "New authentication token required",
+ [PAM_CRED_INSUFFICIENT] = "Insufficient credentials",
+ [PAM_AUTHINFO_UNAVAIL] = "Authentication information is unavailable",
+ [PAM_USER_UNKNOWN] = "Unknown user",
+ [PAM_CRED_UNAVAIL] = "Failed to retrieve user credentials",
+ [PAM_CRED_EXPIRED] = "User credentials have expired",
+ [PAM_CRED_ERR] = "Failed to set user credentials",
+ [PAM_ACCT_EXPIRED] = "User account has expired",
+ [PAM_AUTHTOK_EXPIRED] = "Password has expired",
+ [PAM_SESSION_ERR] = "Session failure",
+ [PAM_AUTHTOK_ERR] = "Authentication token failure",
+ [PAM_AUTHTOK_RECOVERY_ERR] = "Failed to recover old authentication token",
+ [PAM_AUTHTOK_LOCK_BUSY] = "Authentication token lock busy",
+ [PAM_AUTHTOK_DISABLE_AGING] = "Authentication token aging disabled",
+ [PAM_NO_MODULE_DATA] = "Module data not found",
+ [PAM_IGNORE] = "Ignore this module",
+ [PAM_ABORT] = "General failure",
+ [PAM_TRY_AGAIN] = "Try again",
+ [PAM_MODULE_UNKNOWN] = "Unknown module type",
+ [PAM_DOMAIN_UNKNOWN] = "Unknown authentication domain",
+ [PAM_BAD_HANDLE] = "Invalid PAM handle",
+ [PAM_BAD_ITEM] = "Unrecognized or restricted item",
+ [PAM_BAD_FEATURE] = "Unrecognized or restricted feature",
+ [PAM_BAD_CONSTANT] = "Invalid constant",
};
const char *pam_item_name[PAM_NUM_ITEMS] = {
- "(NO ITEM)",
- "PAM_SERVICE",
- "PAM_USER",
- "PAM_TTY",
- "PAM_RHOST",
- "PAM_CONV",
- "PAM_AUTHTOK",
- "PAM_OLDAUTHTOK",
- "PAM_RUSER",
- "PAM_USER_PROMPT",
- "PAM_REPOSITORY",
- "PAM_AUTHTOK_PROMPT",
- "PAM_OLDAUTHTOK_PROMPT",
- "PAM_HOST",
+ [PAM_SERVICE] = "PAM_SERVICE",
+ [PAM_USER] = "PAM_USER",
+ [PAM_TTY] = "PAM_TTY",
+ [PAM_RHOST] = "PAM_RHOST",
+ [PAM_CONV] = "PAM_CONV",
+ [PAM_AUTHTOK] = "PAM_AUTHTOK",
+ [PAM_OLDAUTHTOK] = "PAM_OLDAUTHTOK",
+ [PAM_RUSER] = "PAM_RUSER",
+ [PAM_USER_PROMPT] = "PAM_USER_PROMPT",
+ [PAM_REPOSITORY] = "PAM_REPOSITORY",
+ [PAM_AUTHTOK_PROMPT] = "PAM_AUTHTOK_PROMPT",
+ [PAM_OLDAUTHTOK_PROMPT] = "PAM_OLDAUTHTOK_PROMPT",
+ [PAM_HOST] = "PAM_HOST",
};
const char *pam_facility_name[PAM_NUM_FACILITIES] = {
- [PAM_ACCOUNT] = "account",
- [PAM_AUTH] = "auth",
- [PAM_PASSWORD] = "password",
- [PAM_SESSION] = "session",
+ [PAM_ACCOUNT] = "account",
+ [PAM_AUTH] = "auth",
+ [PAM_PASSWORD] = "password",
+ [PAM_SESSION] = "session",
};
const char *pam_control_flag_name[PAM_NUM_CONTROL_FLAGS] = {
- [PAM_BINDING] = "binding",
- [PAM_OPTIONAL] = "optional",
- [PAM_REQUIRED] = "required",
- [PAM_REQUISITE] = "requisite",
- [PAM_SUFFICIENT] = "sufficient",
+ [PAM_BINDING] = "binding",
+ [PAM_OPTIONAL] = "optional",
+ [PAM_REQUIRED] = "required",
+ [PAM_REQUISITE] = "requisite",
+ [PAM_SUFFICIENT] = "sufficient",
};
const char *pam_func_name[PAM_NUM_PRIMITIVES] = {
- "pam_authenticate",
- "pam_setcred",
- "pam_acct_mgmt",
- "pam_open_session",
- "pam_close_session",
- "pam_chauthtok"
+ [PAM_SM_AUTHENTICATE] = "pam_authenticate",
+ [PAM_SM_SETCRED] = "pam_setcred",
+ [PAM_SM_ACCT_MGMT] = "pam_acct_mgmt",
+ [PAM_SM_OPEN_SESSION] = "pam_open_session",
+ [PAM_SM_CLOSE_SESSION] = "pam_close_session",
+ [PAM_SM_CHAUTHTOK] = "pam_chauthtok"
};
const char *pam_sm_func_name[PAM_NUM_PRIMITIVES] = {
- "pam_sm_authenticate",
- "pam_sm_setcred",
- "pam_sm_acct_mgmt",
- "pam_sm_open_session",
- "pam_sm_close_session",
- "pam_sm_chauthtok"
+ [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"
};
const char *openpam_policy_path[] = {
diff --git a/lib/libpam/openpam_constants.h b/lib/libpam/openpam_constants.h
index a42b4fa76f5b..3ff3cd2a8b5f 100644
--- a/lib/libpam/openpam_constants.h
+++ b/lib/libpam/openpam_constants.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2011 Dag-Erling Smørgrav
+ * Copyright (c) 2011-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,13 +26,14 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_constants.h 659 2013-03-11 14:10:13Z des $
+ * $OpenPAM: openpam_constants.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef OPENPAM_CONSTANTS_H_INCLUDED
#define OPENPAM_CONSTANTS_H_INCLUDED
extern const char *pam_err_name[PAM_NUM_ERRORS];
+extern const char *pam_err_text[PAM_NUM_ERRORS];
extern const char *pam_item_name[PAM_NUM_ITEMS];
extern const char *pam_facility_name[PAM_NUM_FACILITIES];
extern const char *pam_control_flag_name[PAM_NUM_CONTROL_FLAGS];
diff --git a/lib/libpam/openpam_cred.h b/lib/libpam/openpam_cred.h
index 68e2fd9d1c09..99d634630f0d 100644
--- a/lib/libpam/openpam_cred.h
+++ b/lib/libpam/openpam_cred.h
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_cred.h 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_cred.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef OPENPAM_CRED_H_INCLUDED
diff --git a/lib/libpam/openpam_ctype.h b/lib/libpam/openpam_ctype.h
index 671c2f5cf8c9..4920e4022c31 100644
--- a/lib/libpam/openpam_ctype.h
+++ b/lib/libpam/openpam_ctype.h
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_ctype.h 890 2016-01-11 16:22:09Z des $
+ * $OpenPAM: openpam_ctype.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef OPENPAM_CTYPE_H_INCLUDED
diff --git a/lib/libpam/openpam_debug.h b/lib/libpam/openpam_debug.h
index 1fe8346cca8c..d980244444ef 100644
--- a/lib/libpam/openpam_debug.h
+++ b/lib/libpam/openpam_debug.h
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_debug.h 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_debug.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef OPENPAM_DEBUG_H_INCLUDED
diff --git a/lib/libpam/openpam_dispatch.c b/lib/libpam/openpam_dispatch.c
index 391ce8050d8f..ff4c66ac8b94 100644
--- a/lib/libpam/openpam_dispatch.c
+++ b/lib/libpam/openpam_dispatch.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2015 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_dispatch.c 913 2017-01-21 15:11:12Z des $
+ * $OpenPAM: openpam_dispatch.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -107,7 +107,7 @@ openpam_dispatch(pam_handle_t *pamh,
if (chain->module->func[primitive] == NULL) {
openpam_log(PAM_LOG_ERROR, "%s: no %s()",
chain->module->path, pam_sm_func_name[primitive]);
- r = PAM_SYSTEM_ERR;
+ r = PAM_SYMBOL_ERR;
} else {
pamh->primitive = primitive;
pamh->current = chain;
diff --git a/lib/libpam/openpam_dlfunc.h b/lib/libpam/openpam_dlfunc.h
index 6f8724a65d4f..a33de6bee48e 100644
--- a/lib/libpam/openpam_dlfunc.h
+++ b/lib/libpam/openpam_dlfunc.h
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_dlfunc.h 872 2015-12-01 19:25:07Z des $
+ * $OpenPAM: openpam_dlfunc.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef OPENPAM_DLFCN_H_INCLUDED
diff --git a/lib/libpam/openpam_dynamic.c b/lib/libpam/openpam_dynamic.c
index 27cd4e6776da..6a0f006a6394 100644
--- a/lib/libpam/openpam_dynamic.c
+++ b/lib/libpam/openpam_dynamic.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_dynamic.c 683 2013-04-14 14:49:59Z des $
+ * $OpenPAM: openpam_dynamic.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_features.c b/lib/libpam/openpam_features.c
index 387d27bcd384..afffe643fcbc 100644
--- a/lib/libpam/openpam_features.c
+++ b/lib/libpam/openpam_features.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_features.c 890 2016-01-11 16:22:09Z des $
+ * $OpenPAM: openpam_features.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_features.h b/lib/libpam/openpam_features.h
index 00cac1c4b66f..30c0d1a82567 100644
--- a/lib/libpam/openpam_features.h
+++ b/lib/libpam/openpam_features.h
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_features.h 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_features.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef OPENPAM_FEATURES_H_INCLUDED
diff --git a/lib/libpam/openpam_findenv.c b/lib/libpam/openpam_findenv.c
index 3ad2c845794a..99cdcd134363 100644
--- a/lib/libpam/openpam_findenv.c
+++ b/lib/libpam/openpam_findenv.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_findenv.c 914 2017-01-21 15:15:29Z des $
+ * $OpenPAM: openpam_findenv.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_free_data.c b/lib/libpam/openpam_free_data.c
index 8f3d852b4905..c4be65cee569 100644
--- a/lib/libpam/openpam_free_data.c
+++ b/lib/libpam/openpam_free_data.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_free_data.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_free_data.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_free_envlist.c b/lib/libpam/openpam_free_envlist.c
index dda06153205b..e91bc922fd52 100644
--- a/lib/libpam/openpam_free_envlist.c
+++ b/lib/libpam/openpam_free_envlist.c
@@ -24,7 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: openpam_free_envlist.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_free_envlist.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_get_feature.c b/lib/libpam/openpam_get_feature.c
index ad3d9b3ade0f..5f2b66df1541 100644
--- a/lib/libpam/openpam_get_feature.c
+++ b/lib/libpam/openpam_get_feature.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2012 Dag-Erling Smørgrav
+ * Copyright (c) 2012-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_get_feature.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_get_feature.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -50,7 +50,7 @@ openpam_get_feature(int feature, int *onoff)
ENTERF(feature);
if (feature < 0 || feature >= OPENPAM_NUM_FEATURES)
- RETURNC(PAM_SYMBOL_ERR);
+ RETURNC(PAM_BAD_FEATURE);
*onoff = openpam_features[feature].onoff;
RETURNC(PAM_SUCCESS);
}
@@ -58,7 +58,7 @@ openpam_get_feature(int feature, int *onoff)
/*
* Error codes:
*
- * PAM_SYMBOL_ERR
+ * PAM_BAD_FEATURE
*/
/**
diff --git a/lib/libpam/openpam_get_option.c b/lib/libpam/openpam_get_option.c
index 2cf5e87f3f40..3d158d2b1439 100644
--- a/lib/libpam/openpam_get_option.c
+++ b/lib/libpam/openpam_get_option.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_get_option.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_get_option.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_impl.h b/lib/libpam/openpam_impl.h
index 589a3b325539..ad50bc14d360 100644
--- a/lib/libpam/openpam_impl.h
+++ b/lib/libpam/openpam_impl.h
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2001-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_impl.h 915 2017-02-07 12:03:19Z des $
+ * $OpenPAM: openpam_impl.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef OPENPAM_IMPL_H_INCLUDED
diff --git a/lib/libpam/openpam_load.c b/lib/libpam/openpam_load.c
index 614c6fb40938..2edd5efb720f 100644
--- a/lib/libpam/openpam_load.c
+++ b/lib/libpam/openpam_load.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_load.c 890 2016-01-11 16:22:09Z des $
+ * $OpenPAM: openpam_load.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_log.c b/lib/libpam/openpam_log.c
index e52ca95b210c..ecb6758847db 100644
--- a/lib/libpam/openpam_log.c
+++ b/lib/libpam/openpam_log.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_log.c 686 2013-07-11 16:36:02Z des $
+ * $OpenPAM: openpam_log.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_nullconv.c b/lib/libpam/openpam_nullconv.c
index 49c71ba22d82..720b533b6db3 100644
--- a/lib/libpam/openpam_nullconv.c
+++ b/lib/libpam/openpam_nullconv.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_nullconv.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_nullconv.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_readline.c b/lib/libpam/openpam_readline.c
index e3ed9b0a4f01..e43291fbddc6 100644
--- a/lib/libpam/openpam_readline.c
+++ b/lib/libpam/openpam_readline.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_readline.c 703 2013-08-16 11:57:54Z des $
+ * $OpenPAM: openpam_readline.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_readlinev.c b/lib/libpam/openpam_readlinev.c
index d73fc5580e8f..a0df81f7cd0e 100644
--- a/lib/libpam/openpam_readlinev.c
+++ b/lib/libpam/openpam_readlinev.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_readlinev.c 890 2016-01-11 16:22:09Z des $
+ * $OpenPAM: openpam_readlinev.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_readword.c b/lib/libpam/openpam_readword.c
index a73b900cbacd..4a58a819ea5a 100644
--- a/lib/libpam/openpam_readword.c
+++ b/lib/libpam/openpam_readword.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2012-2014 Dag-Erling Smørgrav
+ * Copyright (c) 2012-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_readword.c 916 2017-02-07 12:25:58Z des $
+ * $OpenPAM: openpam_readword.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_restore_cred.c b/lib/libpam/openpam_restore_cred.c
index 8a150cc604e8..59f808b02373 100644
--- a/lib/libpam/openpam_restore_cred.c
+++ b/lib/libpam/openpam_restore_cred.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_restore_cred.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_restore_cred.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_set_feature.c b/lib/libpam/openpam_set_feature.c
index 8e95f3eb057d..f588b179ff27 100644
--- a/lib/libpam/openpam_set_feature.c
+++ b/lib/libpam/openpam_set_feature.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2012 Dag-Erling Smørgrav
+ * Copyright (c) 2012-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_set_feature.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_set_feature.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -50,7 +50,7 @@ openpam_set_feature(int feature, int onoff)
ENTERF(feature);
if (feature < 0 || feature >= OPENPAM_NUM_FEATURES)
- RETURNC(PAM_SYMBOL_ERR);
+ RETURNC(PAM_BAD_FEATURE);
openpam_features[feature].onoff = onoff;
RETURNC(PAM_SUCCESS);
}
@@ -58,7 +58,7 @@ openpam_set_feature(int feature, int onoff)
/*
* Error codes:
*
- * PAM_SYMBOL_ERR
+ * PAM_BAD_FEATURE
*/
/**
diff --git a/lib/libpam/openpam_set_option.c b/lib/libpam/openpam_set_option.c
index 1c06d61d3cc9..e22fb3b492e5 100644
--- a/lib/libpam/openpam_set_option.c
+++ b/lib/libpam/openpam_set_option.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_set_option.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_set_option.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_static.c b/lib/libpam/openpam_static.c
index 302b3f4c4a86..0816b4cc4a0a 100644
--- a/lib/libpam/openpam_static.c
+++ b/lib/libpam/openpam_static.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_static.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_static.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_straddch.c b/lib/libpam/openpam_straddch.c
index 522405c0e23b..0bb32d266adf 100644
--- a/lib/libpam/openpam_straddch.c
+++ b/lib/libpam/openpam_straddch.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_straddch.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_straddch.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_strlcat.c b/lib/libpam/openpam_strlcat.c
index 64ba9ab00986..0d2fd0989c49 100644
--- a/lib/libpam/openpam_strlcat.c
+++ b/lib/libpam/openpam_strlcat.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_strlcat.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_strlcat.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_strlcat.h b/lib/libpam/openpam_strlcat.h
index d09934687970..f561283afd96 100644
--- a/lib/libpam/openpam_strlcat.h
+++ b/lib/libpam/openpam_strlcat.h
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_strlcat.h 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_strlcat.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef OPENPAM_STRLCAT_H_INCLUDED
diff --git a/lib/libpam/openpam_strlcmp.h b/lib/libpam/openpam_strlcmp.h
index d00383870e2c..2b343b40a138 100644
--- a/lib/libpam/openpam_strlcmp.h
+++ b/lib/libpam/openpam_strlcmp.h
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_strlcmp.h 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_strlcmp.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef OPENPAM_STRLCMP_H_INCLUDED
diff --git a/lib/libpam/openpam_strlcpy.c b/lib/libpam/openpam_strlcpy.c
index 7a3d142bbcd1..e4c66aefc4c8 100644
--- a/lib/libpam/openpam_strlcpy.c
+++ b/lib/libpam/openpam_strlcpy.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_strlcpy.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_strlcpy.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_strlcpy.h b/lib/libpam/openpam_strlcpy.h
index 8260c5627e0d..40d300fb4901 100644
--- a/lib/libpam/openpam_strlcpy.h
+++ b/lib/libpam/openpam_strlcpy.h
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_strlcpy.h 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_strlcpy.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef OPENPAM_STRLCPY_H_INCLUDED
diff --git a/lib/libpam/openpam_strlset.c b/lib/libpam/openpam_strlset.c
index febdb5c4ebc8..e3a32dbc033d 100644
--- a/lib/libpam/openpam_strlset.c
+++ b/lib/libpam/openpam_strlset.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_strlset.c 890 2016-01-11 16:22:09Z des $
+ * $OpenPAM: openpam_strlset.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_strlset.h b/lib/libpam/openpam_strlset.h
index 282a26bdbde2..73bfb61c78db 100644
--- a/lib/libpam/openpam_strlset.h
+++ b/lib/libpam/openpam_strlset.h
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_strlset.h 890 2016-01-11 16:22:09Z des $
+ * $OpenPAM: openpam_strlset.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef OPENPAM_STRLSET_H_INCLUDED
diff --git a/lib/libpam/openpam_subst.c b/lib/libpam/openpam_subst.c
index 1a4973477dfb..6456aee1442b 100644
--- a/lib/libpam/openpam_subst.c
+++ b/lib/libpam/openpam_subst.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_subst.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_subst.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_ttyconv.c b/lib/libpam/openpam_ttyconv.c
index 7591eed682bc..8066b3b67298 100644
--- a/lib/libpam/openpam_ttyconv.c
+++ b/lib/libpam/openpam_ttyconv.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_ttyconv.c 890 2016-01-11 16:22:09Z des $
+ * $OpenPAM: openpam_ttyconv.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_vasprintf.c b/lib/libpam/openpam_vasprintf.c
index bedabf4fbd3d..dbdc5c6b1593 100644
--- a/lib/libpam/openpam_vasprintf.c
+++ b/lib/libpam/openpam_vasprintf.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_vasprintf.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_vasprintf.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/openpam_vasprintf.h b/lib/libpam/openpam_vasprintf.h
index e92ad0d2ce6f..f78b6653167a 100644
--- a/lib/libpam/openpam_vasprintf.h
+++ b/lib/libpam/openpam_vasprintf.h
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_vasprintf.h 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: openpam_vasprintf.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef OPENPAM_VASPRINTF_H_INCLUDED
diff --git a/lib/libpam/pam_acct_mgmt.c b/lib/libpam/pam_acct_mgmt.c
index 87337a80ae6f..8f6426d20bf1 100644
--- a/lib/libpam/pam_acct_mgmt.c
+++ b/lib/libpam/pam_acct_mgmt.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_acct_mgmt.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_acct_mgmt.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_authenticate.c b/lib/libpam/pam_authenticate.c
index b24e39685d7e..44cb4c86c4a7 100644
--- a/lib/libpam/pam_authenticate.c
+++ b/lib/libpam/pam_authenticate.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_authenticate.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_authenticate.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -60,7 +60,7 @@ pam_authenticate(pam_handle_t *pamh,
ENTER();
if (flags & ~(PAM_SILENT|PAM_DISALLOW_NULL_AUTHTOK))
- RETURNC(PAM_SYMBOL_ERR);
+ RETURNC(PAM_BAD_CONSTANT);
r = openpam_dispatch(pamh, PAM_SM_AUTHENTICATE, flags);
pam_set_item(pamh, PAM_AUTHTOK, NULL);
RETURNC(r);
@@ -72,7 +72,7 @@ pam_authenticate(pam_handle_t *pamh,
* =openpam_dispatch
* =pam_sm_authenticate
* !PAM_IGNORE
- * PAM_SYMBOL_ERR
+ * PAM_BAD_CONSTANT
*/
/**
@@ -92,5 +92,5 @@ pam_authenticate(pam_handle_t *pamh,
* Fail if the user's authentication token is null.
*
* If any other bits are set, =pam_authenticate will return
- * =PAM_SYMBOL_ERR.
+ * =PAM_BAD_CONSTANT.
*/
diff --git a/lib/libpam/pam_authenticate_secondary.c b/lib/libpam/pam_authenticate_secondary.c
index 9167867833de..02623382f85d 100644
--- a/lib/libpam/pam_authenticate_secondary.c
+++ b/lib/libpam/pam_authenticate_secondary.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_authenticate_secondary.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_authenticate_secondary.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_chauthtok.c b/lib/libpam/pam_chauthtok.c
index 163fec7cf42f..68790b694dfc 100644
--- a/lib/libpam/pam_chauthtok.c
+++ b/lib/libpam/pam_chauthtok.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_chauthtok.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_chauthtok.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -60,7 +60,7 @@ pam_chauthtok(pam_handle_t *pamh,
ENTER();
if (flags & ~(PAM_SILENT|PAM_CHANGE_EXPIRED_AUTHTOK))
- RETURNC(PAM_SYMBOL_ERR);
+ RETURNC(PAM_BAD_CONSTANT);
r = openpam_dispatch(pamh, PAM_SM_CHAUTHTOK,
flags | PAM_PRELIM_CHECK);
if (r == PAM_SUCCESS)
@@ -77,7 +77,7 @@ pam_chauthtok(pam_handle_t *pamh,
* =openpam_dispatch
* =pam_sm_chauthtok
* !PAM_IGNORE
- * PAM_SYMBOL_ERR
+ * PAM_BAD_CONSTANT
*/
/**
@@ -93,5 +93,5 @@ pam_chauthtok(pam_handle_t *pamh,
* =PAM_CHANGE_EXPIRED_AUTHTOK:
* Change only those authentication tokens that have expired.
*
- * If any other bits are set, =pam_chauthtok will return =PAM_SYMBOL_ERR.
+ * If any other bits are set, =pam_chauthtok will return =PAM_BAD_CONSTANT.
*/
diff --git a/lib/libpam/pam_close_session.c b/lib/libpam/pam_close_session.c
index 8bc1efaebaae..8181c829c224 100644
--- a/lib/libpam/pam_close_session.c
+++ b/lib/libpam/pam_close_session.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_close_session.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_close_session.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -60,7 +60,7 @@ pam_close_session(pam_handle_t *pamh,
ENTER();
if (flags & ~(PAM_SILENT))
- RETURNC(PAM_SYMBOL_ERR);
+ RETURNC(PAM_BAD_CONSTANT);
r = openpam_dispatch(pamh, PAM_SM_CLOSE_SESSION, flags);
RETURNC(r);
}
@@ -71,7 +71,7 @@ pam_close_session(pam_handle_t *pamh,
* =openpam_dispatch
* =pam_sm_close_session
* !PAM_IGNORE
- * PAM_SYMBOL_ERR
+ * PAM_BAD_CONSTANT
*/
/**
@@ -85,5 +85,5 @@ pam_close_session(pam_handle_t *pamh,
* Do not emit any messages.
*
* If any other bits are set, =pam_close_session will return
- * =PAM_SYMBOL_ERR.
+ * =PAM_BAD_CONSTANT.
*/
diff --git a/lib/libpam/pam_end.c b/lib/libpam/pam_end.c
index c855b59c4885..04541297d8a6 100644
--- a/lib/libpam/pam_end.c
+++ b/lib/libpam/pam_end.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_end.c 913 2017-01-21 15:11:12Z des $
+ * $OpenPAM: pam_end.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -60,6 +60,8 @@ pam_end(pam_handle_t *pamh,
int i;
ENTER();
+ if (pamh == NULL)
+ RETURNC(PAM_BAD_HANDLE);
/* clear module data */
while ((dp = pamh->module_data) != NULL) {
@@ -89,6 +91,12 @@ pam_end(pam_handle_t *pamh,
RETURNC(PAM_SUCCESS);
}
+/*
+ * Error codes:
+ *
+ * PAM_BAD_HANDLE
+ */
+
/**
* The =pam_end function terminates a PAM transaction and destroys the
* corresponding PAM context, releasing all resources allocated to it.
diff --git a/lib/libpam/pam_error.c b/lib/libpam/pam_error.c
index cd018f5389e5..cba902a819f1 100644
--- a/lib/libpam/pam_error.c
+++ b/lib/libpam/pam_error.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_error.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_error.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_get_authtok.c b/lib/libpam/pam_get_authtok.c
index 83c6b7053fac..6d3dc9c8fa6f 100644
--- a/lib/libpam/pam_get_authtok.c
+++ b/lib/libpam/pam_get_authtok.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_get_authtok.c 913 2017-01-21 15:11:12Z des $
+ * $OpenPAM: pam_get_authtok.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -104,7 +104,7 @@ pam_get_authtok(pam_handle_t *pamh,
twice = 0;
break;
default:
- RETURNC(PAM_SYMBOL_ERR);
+ RETURNC(PAM_BAD_CONSTANT);
}
if (openpam_get_option(pamh, "try_first_pass") ||
openpam_get_option(pamh, "use_first_pass")) {
@@ -170,6 +170,7 @@ pam_get_authtok(pam_handle_t *pamh,
* =pam_prompt
* =pam_set_item
* !PAM_SYMBOL_ERR
+ * PAM_BAD_CONSTANT
* PAM_TRY_AGAIN
*/
diff --git a/lib/libpam/pam_get_data.c b/lib/libpam/pam_get_data.c
index a2f5072cb374..1db50c071ca4 100644
--- a/lib/libpam/pam_get_data.c
+++ b/lib/libpam/pam_get_data.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_get_data.c 913 2017-01-21 15:11:12Z des $
+ * $OpenPAM: pam_get_data.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_get_item.c b/lib/libpam/pam_get_item.c
index e28012ea2672..6babd0fc7aa8 100644
--- a/lib/libpam/pam_get_item.c
+++ b/lib/libpam/pam_get_item.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_get_item.c 913 2017-01-21 15:11:12Z des $
+ * $OpenPAM: pam_get_item.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -76,14 +76,14 @@ pam_get_item(const pam_handle_t *pamh,
*item = pamh->item[item_type];
RETURNC(PAM_SUCCESS);
default:
- RETURNC(PAM_SYMBOL_ERR);
+ RETURNC(PAM_BAD_ITEM);
}
}
/*
* Error codes:
*
- * PAM_SYMBOL_ERR
+ * PAM_BAD_ITEM
*/
/**
diff --git a/lib/libpam/pam_get_mapped_authtok.c b/lib/libpam/pam_get_mapped_authtok.c
index 871405efb5dc..01c283f32cbe 100644
--- a/lib/libpam/pam_get_mapped_authtok.c
+++ b/lib/libpam/pam_get_mapped_authtok.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_get_mapped_authtok.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_get_mapped_authtok.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_get_mapped_username.c b/lib/libpam/pam_get_mapped_username.c
index 25305d2ac55c..05a9a4c4337d 100644
--- a/lib/libpam/pam_get_mapped_username.c
+++ b/lib/libpam/pam_get_mapped_username.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_get_mapped_username.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_get_mapped_username.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_get_user.c b/lib/libpam/pam_get_user.c
index f3fc4b60b8f2..7b1bd66b5316 100644
--- a/lib/libpam/pam_get_user.c
+++ b/lib/libpam/pam_get_user.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_get_user.c 913 2017-01-21 15:11:12Z des $
+ * $OpenPAM: pam_get_user.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_getenv.c b/lib/libpam/pam_getenv.c
index 1e034468fbc2..c3bbcd8eac2f 100644
--- a/lib/libpam/pam_getenv.c
+++ b/lib/libpam/pam_getenv.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_getenv.c 914 2017-01-21 15:15:29Z des $
+ * $OpenPAM: pam_getenv.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_getenvlist.c b/lib/libpam/pam_getenvlist.c
index 4139c2fb4d31..5b660e6b2bd3 100644
--- a/lib/libpam/pam_getenvlist.c
+++ b/lib/libpam/pam_getenvlist.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_getenvlist.c 913 2017-01-21 15:11:12Z des $
+ * $OpenPAM: pam_getenvlist.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -63,7 +63,7 @@ pam_getenvlist(pam_handle_t *pamh)
envlist = malloc(sizeof(char *) * (pamh->env_count + 1));
if (envlist == NULL) {
openpam_log(PAM_LOG_ERROR, "%s",
- pam_strerror(pamh, PAM_BUF_ERR));
+ pam_err_text[PAM_BUF_ERR]);
RETURNP(NULL);
}
for (i = 0; i < pamh->env_count; ++i) {
@@ -74,7 +74,7 @@ pam_getenvlist(pam_handle_t *pamh)
}
FREE(envlist);
openpam_log(PAM_LOG_ERROR, "%s",
- pam_strerror(pamh, PAM_BUF_ERR));
+ pam_err_text[PAM_BUF_ERR]);
RETURNP(NULL);
}
}
diff --git a/lib/libpam/pam_info.c b/lib/libpam/pam_info.c
index 550bb76c9594..d417c6864ba9 100644
--- a/lib/libpam/pam_info.c
+++ b/lib/libpam/pam_info.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_info.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_info.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_open_session.c b/lib/libpam/pam_open_session.c
index de12705088eb..43da3ffe44c5 100644
--- a/lib/libpam/pam_open_session.c
+++ b/lib/libpam/pam_open_session.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_open_session.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_open_session.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -60,7 +60,7 @@ pam_open_session(pam_handle_t *pamh,
ENTER();
if (flags & ~(PAM_SILENT))
- RETURNC(PAM_SYMBOL_ERR);
+ RETURNC(PAM_BAD_CONSTANT);
r = openpam_dispatch(pamh, PAM_SM_OPEN_SESSION, flags);
RETURNC(r);
}
@@ -71,7 +71,7 @@ pam_open_session(pam_handle_t *pamh,
* =openpam_dispatch
* =pam_sm_open_session
* !PAM_IGNORE
- * PAM_SYMBOL_ERR
+ * PAM_BAD_CONSTANT
*/
/**
@@ -86,5 +86,5 @@ pam_open_session(pam_handle_t *pamh,
* Do not emit any messages.
*
* If any other bits are set, =pam_open_session will return
- * =PAM_SYMBOL_ERR.
+ * =PAM_BAD_CONSTANT.
*/
diff --git a/lib/libpam/pam_prompt.c b/lib/libpam/pam_prompt.c
index e3ba0f2b90e7..78b93402ce2a 100644
--- a/lib/libpam/pam_prompt.c
+++ b/lib/libpam/pam_prompt.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_prompt.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_prompt.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_putenv.c b/lib/libpam/pam_putenv.c
index 605277fda6f4..2f3c936e1af8 100644
--- a/lib/libpam/pam_putenv.c
+++ b/lib/libpam/pam_putenv.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_putenv.c 914 2017-01-21 15:15:29Z des $
+ * $OpenPAM: pam_putenv.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_set_data.c b/lib/libpam/pam_set_data.c
index 6a26b6fb02e0..84871c17ccc0 100644
--- a/lib/libpam/pam_set_data.c
+++ b/lib/libpam/pam_set_data.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_set_data.c 913 2017-01-21 15:11:12Z des $
+ * $OpenPAM: pam_set_data.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_set_item.c b/lib/libpam/pam_set_item.c
index 0e8f76f7fa6b..02c6b49b3d27 100644
--- a/lib/libpam/pam_set_item.c
+++ b/lib/libpam/pam_set_item.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_set_item.c 918 2017-02-19 17:46:22Z des $
+ * $OpenPAM: pam_set_item.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -70,7 +70,7 @@ pam_set_item(pam_handle_t *pamh,
case PAM_SERVICE:
/* set once only, by pam_start() */
if (*slot != NULL && item != NULL)
- RETURNC(PAM_SYSTEM_ERR);
+ RETURNC(PAM_BAD_ITEM);
/* fall through */
case PAM_USER:
case PAM_AUTHTOK:
@@ -94,7 +94,7 @@ pam_set_item(pam_handle_t *pamh,
osize = nsize = sizeof(struct pam_conv);
break;
default:
- RETURNC(PAM_SYMBOL_ERR);
+ RETURNC(PAM_BAD_ITEM);
}
if (*slot != NULL) {
memset(*slot, 0xd0, osize);
@@ -113,8 +113,7 @@ pam_set_item(pam_handle_t *pamh,
/*
* Error codes:
*
- * PAM_SYMBOL_ERR
- * PAM_SYSTEM_ERR
+ * PAM_BAD_ITEM
* PAM_BUF_ERR
*/
diff --git a/lib/libpam/pam_set_mapped_authtok.c b/lib/libpam/pam_set_mapped_authtok.c
index c8fbd91b4aac..fa3d2fa4fdf4 100644
--- a/lib/libpam/pam_set_mapped_authtok.c
+++ b/lib/libpam/pam_set_mapped_authtok.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_set_mapped_authtok.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_set_mapped_authtok.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_set_mapped_username.c b/lib/libpam/pam_set_mapped_username.c
index 8f62f53d235d..ee8813b1e973 100644
--- a/lib/libpam/pam_set_mapped_username.c
+++ b/lib/libpam/pam_set_mapped_username.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_set_mapped_username.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_set_mapped_username.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_setcred.c b/lib/libpam/pam_setcred.c
index 7a691765573b..eb71ba808a84 100644
--- a/lib/libpam/pam_setcred.c
+++ b/lib/libpam/pam_setcred.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_setcred.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_setcred.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -61,7 +61,7 @@ pam_setcred(pam_handle_t *pamh,
ENTER();
if (flags & ~(PAM_SILENT|PAM_ESTABLISH_CRED|PAM_DELETE_CRED|
PAM_REINITIALIZE_CRED|PAM_REFRESH_CRED))
- RETURNC(PAM_SYMBOL_ERR);
+ RETURNC(PAM_BAD_CONSTANT);
/* XXX enforce exclusivity */
r = openpam_dispatch(pamh, PAM_SM_SETCRED, flags);
RETURNC(r);
@@ -73,7 +73,7 @@ pam_setcred(pam_handle_t *pamh,
* =openpam_dispatch
* =pam_sm_setcred
* !PAM_IGNORE
- * PAM_SYMBOL_ERR
+ * PAM_BAD_CONSTANT
*/
/**
@@ -95,5 +95,5 @@ pam_setcred(pam_handle_t *pamh,
*
* The latter four are mutually exclusive.
*
- * If any other bits are set, =pam_setcred will return =PAM_SYMBOL_ERR.
+ * If any other bits are set, =pam_setcred will return =PAM_BAD_CONSTANT.
*/
diff --git a/lib/libpam/pam_setenv.c b/lib/libpam/pam_setenv.c
index 3c2209c1c0dd..f05faf236608 100644
--- a/lib/libpam/pam_setenv.c
+++ b/lib/libpam/pam_setenv.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_setenv.c 914 2017-01-21 15:15:29Z des $
+ * $OpenPAM: pam_setenv.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_sm_acct_mgmt.c b/lib/libpam/pam_sm_acct_mgmt.c
index 6420fbac0fb2..0919c26bd54d 100644
--- a/lib/libpam/pam_sm_acct_mgmt.c
+++ b/lib/libpam/pam_sm_acct_mgmt.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_acct_mgmt.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_sm_acct_mgmt.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_sm_authenticate.c b/lib/libpam/pam_sm_authenticate.c
index f31b6ac2db24..79c134866d87 100644
--- a/lib/libpam/pam_sm_authenticate.c
+++ b/lib/libpam/pam_sm_authenticate.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_authenticate.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_sm_authenticate.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_sm_authenticate_secondary.c b/lib/libpam/pam_sm_authenticate_secondary.c
index 4a232fbd0fcb..295614296571 100644
--- a/lib/libpam/pam_sm_authenticate_secondary.c
+++ b/lib/libpam/pam_sm_authenticate_secondary.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_authenticate_secondary.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_sm_authenticate_secondary.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_sm_chauthtok.c b/lib/libpam/pam_sm_chauthtok.c
index 4f17562af288..fcf6542628b3 100644
--- a/lib/libpam/pam_sm_chauthtok.c
+++ b/lib/libpam/pam_sm_chauthtok.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_chauthtok.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_sm_chauthtok.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_sm_close_session.c b/lib/libpam/pam_sm_close_session.c
index 9247d8f5b1fc..ffd78fc2abaa 100644
--- a/lib/libpam/pam_sm_close_session.c
+++ b/lib/libpam/pam_sm_close_session.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_close_session.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_sm_close_session.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_sm_get_mapped_authtok.c b/lib/libpam/pam_sm_get_mapped_authtok.c
index 473a52e7742e..f5fba4ec6770 100644
--- a/lib/libpam/pam_sm_get_mapped_authtok.c
+++ b/lib/libpam/pam_sm_get_mapped_authtok.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_get_mapped_authtok.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_sm_get_mapped_authtok.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_sm_get_mapped_username.c b/lib/libpam/pam_sm_get_mapped_username.c
index 6de9fdb46437..286f6e4a444d 100644
--- a/lib/libpam/pam_sm_get_mapped_username.c
+++ b/lib/libpam/pam_sm_get_mapped_username.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_get_mapped_username.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_sm_get_mapped_username.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_sm_open_session.c b/lib/libpam/pam_sm_open_session.c
index a576a00b1af9..293d40aadef2 100644
--- a/lib/libpam/pam_sm_open_session.c
+++ b/lib/libpam/pam_sm_open_session.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_open_session.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_sm_open_session.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_sm_set_mapped_authtok.c b/lib/libpam/pam_sm_set_mapped_authtok.c
index de0e91f86e5d..afcb55928198 100644
--- a/lib/libpam/pam_sm_set_mapped_authtok.c
+++ b/lib/libpam/pam_sm_set_mapped_authtok.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_set_mapped_authtok.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_sm_set_mapped_authtok.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_sm_set_mapped_username.c b/lib/libpam/pam_sm_set_mapped_username.c
index 2696d3e182ec..ed844c3385a8 100644
--- a/lib/libpam/pam_sm_set_mapped_username.c
+++ b/lib/libpam/pam_sm_set_mapped_username.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_set_mapped_username.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_sm_set_mapped_username.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_sm_setcred.c b/lib/libpam/pam_sm_setcred.c
index 0836adc54f8e..1926c5664031 100644
--- a/lib/libpam/pam_sm_setcred.c
+++ b/lib/libpam/pam_sm_setcred.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_sm_setcred.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_sm_setcred.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_start.c b/lib/libpam/pam_start.c
index 03fae416cad6..6605d9179ce2 100644
--- a/lib/libpam/pam_start.c
+++ b/lib/libpam/pam_start.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_start.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_start.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_strerror.c b/lib/libpam/pam_strerror.c
index 8621ad6c3dd4..2f6fd70a25ba 100644
--- a/lib/libpam/pam_strerror.c
+++ b/lib/libpam/pam_strerror.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_strerror.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_strerror.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -59,69 +59,9 @@ pam_strerror(const pam_handle_t *pamh,
static char unknown[16];
(void)pamh;
-
- switch (error_number) {
- case PAM_SUCCESS:
- return ("success");
- case PAM_OPEN_ERR:
- return ("failed to load module");
- case PAM_SYMBOL_ERR:
- return ("invalid symbol");
- case PAM_SERVICE_ERR:
- return ("error in service module");
- case PAM_SYSTEM_ERR:
- return ("system error");
- case PAM_BUF_ERR:
- return ("memory buffer error");
- case PAM_CONV_ERR:
- return ("conversation failure");
- case PAM_PERM_DENIED:
- return ("permission denied");
- case PAM_MAXTRIES:
- return ("maximum number of tries exceeded");
- case PAM_AUTH_ERR:
- return ("authentication error");
- case PAM_NEW_AUTHTOK_REQD:
- return ("new authentication token required");
- case PAM_CRED_INSUFFICIENT:
- return ("insufficient credentials");
- case PAM_AUTHINFO_UNAVAIL:
- return ("authentication information is unavailable");
- case PAM_USER_UNKNOWN:
- return ("unknown user");
- case PAM_CRED_UNAVAIL:
- return ("failed to retrieve user credentials");
- case PAM_CRED_EXPIRED:
- return ("user credentials have expired");
- case PAM_CRED_ERR:
- return ("failed to set user credentials");
- case PAM_ACCT_EXPIRED:
- return ("user account has expired");
- case PAM_AUTHTOK_EXPIRED:
- return ("password has expired");
- case PAM_SESSION_ERR:
- return ("session failure");
- case PAM_AUTHTOK_ERR:
- return ("authentication token failure");
- case PAM_AUTHTOK_RECOVERY_ERR:
- return ("failed to recover old authentication token");
- case PAM_AUTHTOK_LOCK_BUSY:
- return ("authentication token lock busy");
- case PAM_AUTHTOK_DISABLE_AGING:
- return ("authentication token aging disabled");
- case PAM_NO_MODULE_DATA:
- return ("module data not found");
- case PAM_IGNORE:
- return ("ignore this module");
- case PAM_ABORT:
- return ("general failure");
- case PAM_TRY_AGAIN:
- return ("try again");
- case PAM_MODULE_UNKNOWN:
- return ("unknown module type");
- case PAM_DOMAIN_UNKNOWN:
- return ("unknown authentication domain");
- default:
+ if (error_number >= 0 && error_number < PAM_NUM_ERRORS) {
+ return (pam_err_text[error_number]);
+ } else {
snprintf(unknown, sizeof unknown, "#%d", error_number);
return (unknown);
}
diff --git a/lib/libpam/pam_verror.c b/lib/libpam/pam_verror.c
index 683abbc0b2fb..67950cf71159 100644
--- a/lib/libpam/pam_verror.c
+++ b/lib/libpam/pam_verror.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_verror.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_verror.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_vinfo.c b/lib/libpam/pam_vinfo.c
index 3ae2c7faa19a..3e027914630a 100644
--- a/lib/libpam/pam_vinfo.c
+++ b/lib/libpam/pam_vinfo.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_vinfo.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_vinfo.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/lib/libpam/pam_vprompt.c b/lib/libpam/pam_vprompt.c
index eb337af0dc06..982e6ae5a5ce 100644
--- a/lib/libpam/pam_vprompt.c
+++ b/lib/libpam/pam_vprompt.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_vprompt.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_vprompt.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/misc/gendoc.pl b/misc/gendoc.pl
index 3202dc6f5529..b8e6c96af428 100644
--- a/misc/gendoc.pl
+++ b/misc/gendoc.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
#-
# Copyright (c) 2002-2003 Networks Associates Technology, Inc.
-# Copyright (c) 2004-2014 Dag-Erling Smørgrav
+# Copyright (c) 2004-2017 Dag-Erling Smørgrav
# All rights reserved.
#
# This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -33,7 +33,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $Id: gendoc.pl 910 2017-01-21 12:22:08Z des $
+# $OpenPAM: gendoc.pl 938 2017-04-30 21:34:42Z des $
#
use strict;
@@ -93,6 +93,10 @@ The OpenPAM library is maintained by
PAM_TRY_AGAIN => "Try again",
PAM_MODULE_UNKNOWN => "Unknown module type",
PAM_DOMAIN_UNKNOWN => "Unknown authentication domain",
+ PAM_BAD_HANDLE => "Invalid PAM handle",
+ PAM_BAD_ITEM => "Unrecognized or restricted item",
+ PAM_BAD_FEATURE => "Unrecognized or restricted feature",
+ PAM_BAD_CONSTANT => "Bad constant",
);
sub parse_source($) {
@@ -114,7 +118,7 @@ sub parse_source($) {
my $experimental;
my $version;
my %xref;
- my @errors;
+ my %errors;
my $author;
if ($fn !~ m,\.c$,) {
@@ -130,7 +134,7 @@ sub parse_source($) {
return undef
if ($source =~ m/^ \* NOPARSE\s*$/m);
- if ($source =~ m/(\$Id:[^\$]+\$)/) {
+ if ($source =~ m/(\$OpenPAM:[^\$]+\$)/) {
$version = $1;
}
@@ -168,8 +172,8 @@ sub parse_source($) {
if ($type eq "int") {
foreach (split("\n", $source)) {
- next unless (m/^ \*\s+(!?PAM_[A-Z_]+|=[a-z_]+)\s*$/);
- push(@errors, $1);
+ next unless (m/^ \*\t(!?PAM_[A-Z_]+|=[a-z_]+)\s*(.*?)\s*$/);
+ $errors{$1} = $2;
}
++$xref{3}->{pam_strerror};
}
@@ -335,7 +339,7 @@ sub parse_source($) {
'args' => $args,
'man' => $man,
'xref' => \%xref,
- 'errors' => \@errors,
+ 'errors' => \%errors,
'author' => $author,
'customrv' => $customrv,
'deprecated' => $deprecated,
@@ -365,13 +369,13 @@ sub expand_errors($) {
}
$$func{recursed} = 1;
- foreach (@{$$func{errors}}) {
+ foreach (keys %{$$func{errors}}) {
if (m/^(PAM_[A-Z_]+)$/) {
if (!defined($PAMERR{$1})) {
warn("$$func{name}(): unrecognized error: $1\n");
next;
}
- $errors{$1} = 1;
+ $errors{$1} = $$func{errors}->{$_};
} elsif (m/^!(PAM_[A-Z_]+)$/) {
# treat negations separately
} elsif (m/^=([a-z_]+)$/) {
@@ -385,20 +389,20 @@ sub expand_errors($) {
warn("$$func{name}(): reference to unknown $ref()\n");
next;
}
- foreach (@{$FUNCTIONS{$ref}->{errors}}) {
- $errors{$_} = 1;
+ foreach (keys %{$FUNCTIONS{$ref}->{errors}}) {
+ $errors{$_} //= $FUNCTIONS{$ref}->{errors}->{$_};
}
} else {
warn("$$func{name}(): invalid error specification: $_\n");
}
}
- foreach (@{$$func{errors}}) {
+ foreach (keys %{$$func{errors}}) {
if (m/^!(PAM_[A-Z_]+)$/) {
delete($errors{$1});
}
}
delete($$func{recursed});
- $$func{errors} = [ sort(keys(%errors)) ];
+ $$func{errors} = \%errors;
}
sub dictionary_order($$) {
@@ -430,6 +434,7 @@ sub gendoc($) {
my $func = shift; # Ref to function hash
local *FILE;
+ my %errors;
my $mdoc;
my $fn;
@@ -489,18 +494,21 @@ sub gendoc($) {
$mdoc .= ".Ef\n.Pp\n";
}
$mdoc .= "$$func{man}\n";
- my @errors = @{$$func{errors}};
+ %errors = %{$$func{errors}};
if ($$func{customrv}) {
# leave it
- } elsif ($$func{type} eq "int" && @errors) {
+ } elsif ($$func{type} eq "int" && %errors) {
$mdoc .= ".Sh RETURN VALUES
The
.Fn $$func{name}
function returns one of the following values:
.Bl -tag -width 18n
";
- foreach (@errors) {
- $mdoc .= ".It Bq Er $_\n$PAMERR{$_}.\n";
+ delete($errors{PAM_SUCCESS});
+ foreach ('PAM_SUCCESS', sort keys %errors) {
+ $mdoc .= ".It Bq Er $_\n" .
+ ($errors{$_} || $PAMERR{$_}) .
+ ".\n";
}
$mdoc .= ".El\n";
} elsif ($$func{type} eq "int") {
diff --git a/mkpkgng.in b/mkpkgng.in
index 3c57b7dc184f..da4e75919bef 100644
--- a/mkpkgng.in
+++ b/mkpkgng.in
@@ -27,7 +27,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $Id: mkpkgng.in 890 2016-01-11 16:22:09Z des $
+# $OpenPAM: mkpkgng.in 938 2017-04-30 21:34:42Z des $
#
# Print an informational message
diff --git a/modules/Makefile.am b/modules/Makefile.am
index 2ce129e5175c..99dd788c9d4d 100644
--- a/modules/Makefile.am
+++ b/modules/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 907 2017-01-18 09:39:01Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
SUBDIRS = pam_deny pam_permit pam_return
diff --git a/modules/Makefile.in b/modules/Makefile.in
index 172cda967b8f..683fe342cd36 100644
--- a/modules/Makefile.in
+++ b/modules/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am 907 2017-01-18 09:39:01Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
diff --git a/modules/pam_deny/Makefile.am b/modules/pam_deny/Makefile.am
index d48418cf258c..f2b4fcb07e8a 100644
--- a/modules/pam_deny/Makefile.am
+++ b/modules/pam_deny/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 834 2014-10-28 10:25:58Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
if CUSTOM_MODULES_DIR
moduledir = $(OPENPAM_MODULES_DIR)
diff --git a/modules/pam_deny/Makefile.in b/modules/pam_deny/Makefile.in
index 17437e8e3ad1..7f92f93fef04 100644
--- a/modules/pam_deny/Makefile.in
+++ b/modules/pam_deny/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am 834 2014-10-28 10:25:58Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
VPATH = @srcdir@
am__is_gnu_make = { \
diff --git a/modules/pam_deny/pam_deny.c b/modules/pam_deny/pam_deny.c
index d6983c5a3521..e0b1762bd200 100644
--- a/modules/pam_deny/pam_deny.c
+++ b/modules/pam_deny/pam_deny.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_deny.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_deny.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/modules/pam_permit/Makefile.am b/modules/pam_permit/Makefile.am
index b058c1e1aa02..faec653ccf59 100644
--- a/modules/pam_permit/Makefile.am
+++ b/modules/pam_permit/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 834 2014-10-28 10:25:58Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
if CUSTOM_MODULES_DIR
moduledir = $(OPENPAM_MODULES_DIR)
diff --git a/modules/pam_permit/Makefile.in b/modules/pam_permit/Makefile.in
index ab3587037924..dbe448aaaa95 100644
--- a/modules/pam_permit/Makefile.in
+++ b/modules/pam_permit/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am 834 2014-10-28 10:25:58Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
VPATH = @srcdir@
am__is_gnu_make = { \
diff --git a/modules/pam_permit/pam_permit.c b/modules/pam_permit/pam_permit.c
index f42b6c1a95ca..454853456d75 100644
--- a/modules/pam_permit/pam_permit.c
+++ b/modules/pam_permit/pam_permit.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_permit.c 648 2013-03-05 17:54:27Z des $
+ * $OpenPAM: pam_permit.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/modules/pam_return/Makefile.am b/modules/pam_return/Makefile.am
index 33e67262596a..eaecc212fb04 100644
--- a/modules/pam_return/Makefile.am
+++ b/modules/pam_return/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 873 2015-12-01 19:38:01Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
if CUSTOM_MODULES_DIR
moduledir = $(OPENPAM_MODULES_DIR)
diff --git a/modules/pam_return/Makefile.in b/modules/pam_return/Makefile.in
index cbb884be8565..47c52cb5cb07 100644
--- a/modules/pam_return/Makefile.in
+++ b/modules/pam_return/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am 873 2015-12-01 19:38:01Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
VPATH = @srcdir@
am__is_gnu_make = { \
diff --git a/modules/pam_return/pam_return.c b/modules/pam_return/pam_return.c
index 9455e338cc8e..dcbfe95b8268 100644
--- a/modules/pam_return/pam_return.c
+++ b/modules/pam_return/pam_return.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_return.c 873 2015-12-01 19:38:01Z des $
+ * $OpenPAM: pam_return.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/modules/pam_unix/Makefile.am b/modules/pam_unix/Makefile.am
index a1c97c737cec..418f31524462 100644
--- a/modules/pam_unix/Makefile.am
+++ b/modules/pam_unix/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 834 2014-10-28 10:25:58Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
if CUSTOM_MODULES_DIR
moduledir = $(OPENPAM_MODULES_DIR)
diff --git a/modules/pam_unix/Makefile.in b/modules/pam_unix/Makefile.in
index 1a2507d9bd80..fda413dd5515 100644
--- a/modules/pam_unix/Makefile.in
+++ b/modules/pam_unix/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am 834 2014-10-28 10:25:58Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
VPATH = @srcdir@
am__is_gnu_make = { \
diff --git a/modules/pam_unix/pam_unix.c b/modules/pam_unix/pam_unix.c
index 06d020bc3a22..ab8134d7a85b 100644
--- a/modules/pam_unix/pam_unix.c
+++ b/modules/pam_unix/pam_unix.c
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pam_unix.c 890 2016-01-11 16:22:09Z des $
+ * $OpenPAM: pam_unix.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
diff --git a/t/Makefile.am b/t/Makefile.am
index 9c538a4dd959..55fdb48b7e68 100644
--- a/t/Makefile.am
+++ b/t/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 922 2017-02-19 19:28:30Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
if WITH_TEST
diff --git a/t/Makefile.in b/t/Makefile.in
index 119d686e9c00..002fdd8404fa 100644
--- a/t/Makefile.in
+++ b/t/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am 922 2017-02-19 19:28:30Z des $
+# $OpenPAM: Makefile.am 938 2017-04-30 21:34:42Z des $
VPATH = @srcdir@
am__is_gnu_make = { \
diff --git a/t/t_openpam_ctype.c b/t/t_openpam_ctype.c
index 3fd617d4c7af..ec7e807d0e60 100644
--- a/t/t_openpam_ctype.c
+++ b/t/t_openpam_ctype.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2014-2015 Dag-Erling Smørgrav
+ * Copyright (c) 2014-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: t_openpam_ctype.c 922 2017-02-19 19:28:30Z des $
+ * $OpenPAM: t_openpam_ctype.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -75,7 +75,7 @@ static const char oc_pfcs[] = OC_PFCS;
crib[(int)oc_##set[i]] = 1; \
for (i = ret = 0; i < sizeof crib; ++i) { \
if (is_##set(i) != crib[i]) { \
- t_verbose("is_%s() incorrect " \
+ t_printv("is_%s() incorrect " \
"for %#02x\n", #set, i); \
++ret; \
} \
diff --git a/t/t_openpam_dispatch.c b/t/t_openpam_dispatch.c
index f198a994e63e..f2f3053a726c 100644
--- a/t/t_openpam_dispatch.c
+++ b/t/t_openpam_dispatch.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2015 Dag-Erling Smørgrav
+ * Copyright (c) 2015-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: t_openpam_dispatch.c 922 2017-02-19 19:28:30Z des $
+ * $OpenPAM: t_openpam_dispatch.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -54,7 +54,7 @@
OPENPAM_UNUSED(void *arg))
#define T(n) \
- t_add_test(&t_ ## n ## _func, NULL, t_ ## n ## _desc)
+ t_add_test(&t_ ## n ## _func, NULL, "%s", t_ ## n ## _desc)
const char *pam_return_so;
@@ -73,7 +73,7 @@ T_FUNC(empty_policy, "empty policy")
t_fprintf(tf, "# empty policy\n");
pam_err = pam_start(tf->name, "test", &pamc, &pamh);
if (pam_err != PAM_SUCCESS) {
- t_verbose("pam_start() returned %d\n", pam_err);
+ t_printv("pam_start() returned %d\n", pam_err);
return (0);
}
/*
@@ -82,22 +82,22 @@ T_FUNC(empty_policy, "empty policy")
* instead.
*/
pam_err = pam_authenticate(pamh, 0);
- t_verbose("pam_authenticate() returned %d\n", pam_err);
+ t_printv("pam_authenticate() returned %d\n", pam_err);
ret = (pam_err == PAM_SYSTEM_ERR);
pam_err = pam_setcred(pamh, 0);
- t_verbose("pam_setcred() returned %d\n", pam_err);
+ t_printv("pam_setcred() returned %d\n", pam_err);
ret &= (pam_err == PAM_SYSTEM_ERR);
pam_err = pam_acct_mgmt(pamh, 0);
- t_verbose("pam_acct_mgmt() returned %d\n", pam_err);
+ t_printv("pam_acct_mgmt() returned %d\n", pam_err);
ret &= (pam_err == PAM_SYSTEM_ERR);
pam_err = pam_chauthtok(pamh, 0);
- t_verbose("pam_chauthtok() returned %d\n", pam_err);
+ t_printv("pam_chauthtok() returned %d\n", pam_err);
ret &= (pam_err == PAM_SYSTEM_ERR);
pam_err = pam_open_session(pamh, 0);
- t_verbose("pam_open_session() returned %d\n", pam_err);
+ t_printv("pam_open_session() returned %d\n", pam_err);
ret &= (pam_err == PAM_SYSTEM_ERR);
pam_err = pam_close_session(pamh, 0);
- t_verbose("pam_close_session() returned %d\n", pam_err);
+ t_printv("pam_close_session() returned %d\n", pam_err);
ret &= (pam_err == PAM_SYSTEM_ERR);
pam_end(pamh, pam_err);
t_fclose(tf);
@@ -150,7 +150,7 @@ T_FUNC(mod_return, "module return value")
}
pam_err = pam_start(tf->name, "test", &pamc, &pamh);
if (pam_err != PAM_SUCCESS) {
- t_verbose("pam_start() returned %d\n", pam_err);
+ t_printv("pam_start() returned %d\n", pam_err);
t_fclose(tf);
continue;
}
@@ -174,10 +174,10 @@ T_FUNC(mod_return, "module return value")
pam_err = pam_chauthtok(pamh, tc->flags);
break;
}
- t_verbose("%s returned %d\n",
+ t_printv("%s returned %d\n",
pam_func_name[tc->primitive], pam_err);
pam_end(pamh, pam_err);
- t_verbose("here\n");
+ t_printv("here\n");
t_fclose(tf);
}
return (1);
@@ -196,7 +196,7 @@ t_prepare(int argc, char *argv[])
(void)argv;
if ((pam_return_so = getenv("PAM_RETURN_SO")) == NULL) {
- t_verbose("define PAM_RETURN_SO before running these tests\n");
+ t_printv("define PAM_RETURN_SO before running these tests\n");
return (0);
}
diff --git a/t/t_openpam_readlinev.c b/t/t_openpam_readlinev.c
index abc29e26cd55..e32f33879453 100644
--- a/t/t_openpam_readlinev.c
+++ b/t/t_openpam_readlinev.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2012-2015 Dag-Erling Smørgrav
+ * Copyright (c) 2012-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: t_openpam_readlinev.c 922 2017-02-19 19:28:30Z des $
+ * $OpenPAM: t_openpam_readlinev.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -52,7 +52,7 @@
OPENPAM_UNUSED(void *arg))
#define T(n) \
- t_add_test(&t_ ## n ## _func, NULL, t_ ## n ## _desc)
+ t_add_test(&t_ ## n ## _func, NULL, "%s", t_ ## n ## _desc)
/*
* Read a line from the temp file and verify that the result matches our
@@ -76,20 +76,20 @@ orlv_expect(struct t_file *tf, const char **expectedv, int lines, int eof)
if (t_ferror(tf))
err(1, "%s(): %s", __func__, tf->name);
if (expectedv != NULL && gotv == NULL) {
- t_verbose("expected %d words, got nothing\n", expectedc);
+ t_printv("expected %d words, got nothing\n", expectedc);
ret = 0;
} else if (expectedv == NULL && gotv != NULL) {
- t_verbose("expected nothing, got %d words\n", gotc);
+ t_printv("expected nothing, got %d words\n", gotc);
ret = 0;
} else if (expectedv != NULL && gotv != NULL) {
if (expectedc != gotc) {
- t_verbose("expected %d words, got %d\n",
+ t_printv("expected %d words, got %d\n",
expectedc, gotc);
ret = 0;
}
for (i = 0; i < gotc; ++i) {
if (strcmp(expectedv[i], gotv[i]) != 0) {
- t_verbose("word %d: expected <<%s>>, "
+ t_printv("word %d: expected <<%s>>, "
"got <<%s>>\n", i, expectedv[i], gotv[i]);
ret = 0;
}
@@ -97,15 +97,15 @@ orlv_expect(struct t_file *tf, const char **expectedv, int lines, int eof)
}
FREEV(gotc, gotv);
if (lineno != lines) {
- t_verbose("expected to advance %d lines, advanced %d lines\n",
+ t_printv("expected to advance %d lines, advanced %d lines\n",
lines, lineno);
ret = 0;
}
if (eof && !t_feof(tf)) {
- t_verbose("expected EOF, but didn't get it\n");
+ t_printv("expected EOF, but didn't get it\n");
ret = 0;
} else if (!eof && t_feof(tf)) {
- t_verbose("didn't expect EOF, but got it anyway\n");
+ t_printv("didn't expect EOF, but got it anyway\n");
ret = 0;
}
return (ret);
diff --git a/t/t_openpam_readword.c b/t/t_openpam_readword.c
index 767696e52a55..e7e9871f45ca 100644
--- a/t/t_openpam_readword.c
+++ b/t/t_openpam_readword.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2012-2015 Dag-Erling Smørgrav
+ * Copyright (c) 2012-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: t_openpam_readword.c 922 2017-02-19 19:28:30Z des $
+ * $OpenPAM: t_openpam_readword.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -34,6 +34,7 @@
#endif
#include <err.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -50,7 +51,7 @@
OPENPAM_UNUSED(void *arg))
#define T(n) \
- t_add_test(&t_ ## n ## _func, NULL, t_ ## n ## _desc)
+ t_add_test(&t_ ## n ## _func, NULL, "%s", t_ ## n ## _desc)
/*
* Read a word from the temp file and verify that the result matches our
@@ -71,37 +72,37 @@ orw_expect(struct t_file *tf, const char *expected, int lines, int eof, int eol)
if (t_ferror(tf))
err(1, "%s(): %s", __func__, tf->name);
if (expected != NULL && got == NULL) {
- t_verbose("expected <<%s>>, got nothing\n", expected);
+ t_printv("expected <<%s>>, got nothing\n", expected);
ret = 0;
} else if (expected == NULL && got != NULL) {
- t_verbose("expected nothing, got <<%s>>\n", got);
+ t_printv("expected nothing, got <<%s>>\n", got);
ret = 0;
} else if (expected != NULL && got != NULL && strcmp(expected, got) != 0) {
- t_verbose("expected <<%s>>, got <<%s>>\n", expected, got);
+ t_printv("expected <<%s>>, got <<%s>>\n", expected, got);
ret = 0;
}
free(got);
if (lineno != lines) {
- t_verbose("expected to advance %d lines, advanced %d lines\n",
+ t_printv("expected to advance %d lines, advanced %d lines\n",
lines, lineno);
ret = 0;
}
if (eof && !t_feof(tf)) {
- t_verbose("expected EOF, but didn't get it\n");
+ t_printv("expected EOF, but didn't get it\n");
ret = 0;
}
if (!eof && t_feof(tf)) {
- t_verbose("didn't expect EOF, but got it anyway\n");
+ t_printv("didn't expect EOF, but got it anyway\n");
ret = 0;
}
ch = fgetc(tf->file);
if (t_ferror(tf))
err(1, "%s(): %s", __func__, tf->name);
if (eol && ch != '\n') {
- t_verbose("expected EOL, but didn't get it\n");
+ t_printv("expected EOL, but didn't get it\n");
ret = 0;
} else if (!eol && ch == '\n') {
- t_verbose("didn't expect EOL, but got it anyway\n");
+ t_printv("didn't expect EOL, but got it anyway\n");
ret = 0;
}
if (ch != EOF)
diff --git a/t/t_pam_conv.c b/t/t_pam_conv.c
index 58e5c086c1b5..243d96df3f76 100644
--- a/t/t_pam_conv.c
+++ b/t/t_pam_conv.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2015 Dag-Erling Smørgrav
+ * Copyright (c) 2015-2017 Dag-Erling Smørgrav
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: t_pam_conv.c 922 2017-02-19 19:28:30Z des $
+ * $OpenPAM: t_pam_conv.c 938 2017-04-30 21:34:42Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -99,16 +99,16 @@ t_pam_conv(int nm, const struct pam_message **msgs,
}
switch (msgs[i]->msg_style) {
case PAM_PROMPT_ECHO_OFF:
- t_verbose("[PAM_PROMPT_ECHO_OFF] %s\n", msgs[i]->msg);
+ t_printv("[PAM_PROMPT_ECHO_OFF] %s\n", msgs[i]->msg);
break;
case PAM_PROMPT_ECHO_ON:
- t_verbose("[PAM_PROMPT_ECHO_ON] %s\n", msgs[i]->msg);
+ t_printv("[PAM_PROMPT_ECHO_ON] %s\n", msgs[i]->msg);
break;
case PAM_ERROR_MSG:
- t_verbose("[PAM_ERROR_MSG] %s\n", msgs[i]->msg);
+ t_printv("[PAM_ERROR_MSG] %s\n", msgs[i]->msg);
break;
case PAM_TEXT_INFO:
- t_verbose("[PAM_TEXT_INFO] %s\n", msgs[i]->msg);
+ t_printv("[PAM_TEXT_INFO] %s\n", msgs[i]->msg);
break;
default:
asprintf(&s->comment, "invalid message style %d",
diff --git a/t/t_pam_conv.h b/t/t_pam_conv.h
index ab0749744594..07ba702c940a 100644
--- a/t/t_pam_conv.h
+++ b/t/t_pam_conv.h
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: t_pam_conv.h 863 2015-07-30 23:44:31Z des $
+ * $OpenPAM: t_pam_conv.h 938 2017-04-30 21:34:42Z des $
*/
#ifndef T_PAM_CONV_H_INCLUDED