Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/openpam/dist/lib PR/46801: Izumi Tsutsui:



details:   https://anonhg.NetBSD.org/src/rev/3a44567e083b
branches:  trunk
changeset: 781013:3a44567e083b
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Aug 15 06:16:41 2012 +0000

description:
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

diffstat:

 external/bsd/openpam/dist/lib/openpam_dynamic.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r a545ee5324f0 -r 3a44567e083b external/bsd/openpam/dist/lib/openpam_dynamic.c
--- a/external/bsd/openpam/dist/lib/openpam_dynamic.c   Wed Aug 15 05:55:43 2012 +0000
+++ b/external/bsd/openpam/dist/lib/openpam_dynamic.c   Wed Aug 15 06:16:41 2012 +0000
@@ -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.4 2012/08/15 06:16:41 christos Exp $     */
 
 /*-
  * Copyright (c) 2002-2003 Networks Associates Technology, Inc.
@@ -123,11 +123,14 @@
        }
        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);
 }
 



Home | Main Index | Thread Index | Old Index