Module Name: src
Committed By: riz
Date: Thu Aug 16 02:41:05 UTC 2012
Modified Files:
src/external/bsd/openpam/dist/lib [netbsd-6]: openpam_dynamic.c
Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #505):
external/bsd/openpam/dist/lib/openpam_dynamic.c: revision 1.4
PR/46801: Izumi Tsutsui:
- downgrade the error of not finding a file to load to a debug message.
Statically linked OpenPAM (like on sun2) does not have shared objects.
- make sure we preserve errno around dlclose() which will call munmap()
XXX: Pullup to 6
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.2.1 \
src/external/bsd/openpam/dist/lib/openpam_dynamic.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_dynamic.c
diff -u src/external/bsd/openpam/dist/lib/openpam_dynamic.c:1.3 src/external/bsd/openpam/dist/lib/openpam_dynamic.c:1.3.2.1
--- src/external/bsd/openpam/dist/lib/openpam_dynamic.c:1.3 Tue Jan 3 18:56:49 2012
+++ src/external/bsd/openpam/dist/lib/openpam_dynamic.c Thu Aug 16 02:41:05 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: openpam_dynamic.c,v 1.3 2012/01/03 18:56:49 christos Exp $ */
+/* $NetBSD: openpam_dynamic.c,v 1.3.2.1 2012/08/16 02:41:05 riz Exp $ */
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
@@ -123,11 +123,14 @@ openpam_dynamic(const char *path)
}
return (module);
buf_err:
+ serrno = errno;
if (dlh != NULL)
dlclose(dlh);
FREE(module);
+ errno = serrno;
err:
- openpam_log(PAM_LOG_ERROR, "%s: %s", epath, strerror(errno));
+ openpam_log(errno == ENOENT ? PAM_LOG_DEBUG : PAM_LOG_ERROR, "%s: %s",
+ epath, strerror(errno));
return (NULL);
}