Module Name: src
Committed By: spz
Date: Tue Jun 17 07:08:47 UTC 2014
Modified Files:
src/external/bsd/openpam/dist/lib: openpam_configure.c
Log Message:
make sure we have a log message at the appropriate level (error) on
why pam is failing in the case of an included pam config file missing.
example: instead of logging with the default log settings:
Jun 17 08:49:37 tucana su: pam_start failed: system error
it will log:
Jun 17 08:55:49 tucana su: in openpam_parse_chain(): failed loading include for
service gibbetnich in /etc/pam.d/su(15): No such file or directory
Jun 17 08:55:49 tucana su: pam_start failed: system error
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/external/bsd/openpam/dist/lib/openpam_configure.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/openpam/dist/lib/openpam_configure.c
diff -u src/external/bsd/openpam/dist/lib/openpam_configure.c:1.9 src/external/bsd/openpam/dist/lib/openpam_configure.c:1.10
--- src/external/bsd/openpam/dist/lib/openpam_configure.c:1.9 Tue Jun 3 20:22:54 2014
+++ src/external/bsd/openpam/dist/lib/openpam_configure.c Tue Jun 17 07:08:47 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: openpam_configure.c,v 1.9 2014/06/03 20:22:54 christos Exp $ */
+/* $NetBSD: openpam_configure.c,v 1.10 2014/06/17 07:08:47 spz Exp $ */
/*-
* Copyright (c) 2001-2003 Networks Associates Technology, Inc.
@@ -229,8 +229,19 @@ openpam_parse_chain(pam_handle_t *pamh,
* outer loop does not just ignore the
* error and keep searching.
*/
- if (errno == ENOENT)
+ if (errno == ENOENT) {
+ /*
+ * we're failing load, make sure
+ * there's a log message of severity
+ * higher than debug
+ */
+ openpam_log(PAM_LOG_ERROR,
+ "failed loading include for service "
+ "%s in %s(%d): %s",
+ servicename, filename, lineno,
+ strerror(errno));
errno = EINVAL;
+ }
goto fail;
}
continue;