summaryrefslogtreecommitdiffstats
path: root/contrib/openpam/lib
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2002-05-24 13:18:43 +0000
committerdes <des@FreeBSD.org>2002-05-24 13:18:43 +0000
commit658709f5bc0aa7ef8c87276699c29189ed3948cc (patch)
treead427719e2e0b91f72e147929569cf1f1ecd1f95 /contrib/openpam/lib
parentd5f591c3abf029023df71a6a7fb0f8856d16fd6c (diff)
downloadFreeBSD-src-658709f5bc0aa7ef8c87276699c29189ed3948cc.zip
FreeBSD-src-658709f5bc0aa7ef8c87276699c29189ed3948cc.tar.gz
Vendor import of OpenPAM Cinquefoil.
Diffstat (limited to 'contrib/openpam/lib')
-rw-r--r--contrib/openpam/lib/openpam_log.c5
-rw-r--r--contrib/openpam/lib/openpam_nullconv.c18
-rw-r--r--contrib/openpam/lib/openpam_ttyconv.c16
-rw-r--r--contrib/openpam/lib/pam_get_authtok.c2
4 files changed, 37 insertions, 4 deletions
diff --git a/contrib/openpam/lib/openpam_log.c b/contrib/openpam/lib/openpam_log.c
index 899a6f7..4ce7751 100644
--- a/contrib/openpam/lib/openpam_log.c
+++ b/contrib/openpam/lib/openpam_log.c
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $P4: //depot/projects/openpam/lib/openpam_log.c#13 $
+ * $P4: //depot/projects/openpam/lib/openpam_log.c#14 $
*/
#include <ctype.h>
@@ -106,6 +106,9 @@ openpam_log(int level, const char *fmt, ...)
switch (level) {
case PAM_LOG_DEBUG:
+#ifndef DEBUG
+ return;
+#endif
priority = LOG_DEBUG;
break;
case PAM_LOG_VERBOSE:
diff --git a/contrib/openpam/lib/openpam_nullconv.c b/contrib/openpam/lib/openpam_nullconv.c
index 6534c11..544b484 100644
--- a/contrib/openpam/lib/openpam_nullconv.c
+++ b/contrib/openpam/lib/openpam_nullconv.c
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $P4: //depot/projects/openpam/lib/openpam_nullconv.c#1 $
+ * $P4: //depot/projects/openpam/lib/openpam_nullconv.c#2 $
*/
#include <sys/types.h>
@@ -66,3 +66,19 @@ openpam_nullconv(int n,
*
* PAM_CONV_ERR
*/
+
+/**
+ * The =openpam_nullconv function is a null conversation function suitable
+ * for applications that want to use PAM but don't support interactive
+ * dialog with the user. Such applications should set =PAM_AUTHTOK to
+ * whatever authentication token they've obtained on their own before
+ * calling =pam_authenticate and / or =pam_chauthtok, and their PAM
+ * configuration should specify the ;use_first_pass option for all modules
+ * that require access to the authentication token, to make sure they use
+ * =PAM_AUTHTOK rather than try to query the user.
+ *
+ * >openpam_ttyconv
+ * >pam_prompt
+ * >pam_set_item
+ * >pam_vprompt
+ */
diff --git a/contrib/openpam/lib/openpam_ttyconv.c b/contrib/openpam/lib/openpam_ttyconv.c
index fc02405..b35a5f9 100644
--- a/contrib/openpam/lib/openpam_ttyconv.c
+++ b/contrib/openpam/lib/openpam_ttyconv.c
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $P4: //depot/projects/openpam/lib/openpam_ttyconv.c#10 $
+ * $P4: //depot/projects/openpam/lib/openpam_ttyconv.c#11 $
*/
#include <sys/types.h>
@@ -192,3 +192,17 @@ openpam_ttyconv(int n,
* PAM_BUF_ERR
* PAM_CONV_ERR
*/
+
+/**
+ * The =openpam_ttyconv function is a standard conversation function
+ * suitable for use on TTY devices. It should be adequate for the needs
+ * of most text-based interactive programs.
+ *
+ * The =openpam_ttyconv function allows the application to specify a
+ * timeout for user input by setting the global variable
+ * :openpam_ttyconv_timeout to the length of the timeout in seconds.
+ *
+ * >openpam_nullconv
+ * >pam_prompt
+ * >pam_vprompt
+ */
diff --git a/contrib/openpam/lib/pam_get_authtok.c b/contrib/openpam/lib/pam_get_authtok.c
index d89460f..d56de79 100644
--- a/contrib/openpam/lib/pam_get_authtok.c
+++ b/contrib/openpam/lib/pam_get_authtok.c
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $P4: //depot/projects/openpam/lib/pam_get_authtok.c#17 $
+ * $P4: //depot/projects/openpam/lib/pam_get_authtok.c#18 $
*/
#include <sys/param.h>
OpenPOWER on IntegriCloud