Module Name:    src
Committed By:   christos
Date:           Wed Aug 15 06:16:41 UTC 2012

Modified Files:
        src/external/bsd/openpam/dist/lib: openpam_dynamic.c

Log Message:
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.4 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.4
--- src/external/bsd/openpam/dist/lib/openpam_dynamic.c:1.3	Tue Jan  3 13:56:49 2012
+++ src/external/bsd/openpam/dist/lib/openpam_dynamic.c	Wed Aug 15 02:16:41 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.4 2012/08/15 06:16:41 christos 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);
 }
 

Reply via email to