Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Apr 2002 23:31:31 -0700 (PDT)
From:      Dag-Erling Smorgrav <des@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 9760 for review
Message-ID:  <200204150631.g3F6VVZ13705@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=9760

Change 9760 by des@des.at.des.thinksec.com on 2002/04/14 23:30:42

	Additional debugging messages.

Affected files ...

... //depot/projects/openpam/lib/openpam_dynamic.c#4 edit

Differences ...

==== //depot/projects/openpam/lib/openpam_dynamic.c#4 (text+ko) ====

@@ -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_dynamic.c#3 $
+ * $P4: //depot/projects/openpam/lib/openpam_dynamic.c#4 $
  */
 
 #include <dlfcn.h>
@@ -64,8 +64,10 @@
 	if (asprintf(&vpath, "%s.%d", path, LIB_MAJ) == -1)
 		goto buf_err;
 	if ((dlh = dlopen(vpath, RTLD_NOW)) == NULL) {
+		openpam_log(PAM_LOG_DEBUG, "%s: %s", vpath, dlerror());
 		*strrchr(vpath, '.') = '\0';
 		if ((dlh = dlopen(vpath, RTLD_NOW)) == NULL) {
+			openpam_log(PAM_LOG_DEBUG, "%s: %s", vpath, dlerror());
 			free(module);
 			return (NULL);
 		}
@@ -74,8 +76,12 @@
 	if ((module->path = strdup(path)) == NULL)
 		goto buf_err;
 	module->dlh = dlh;
-	for (i = 0; i < PAM_NUM_PRIMITIVES; ++i)
+	for (i = 0; i < PAM_NUM_PRIMITIVES; ++i) {
 		module->func[i] = dlsym(dlh, _pam_sm_func_name[i]);
+		if (module->func[i] == NULL)
+			openpam_log(PAM_LOG_DEBUG, "%s: %s(): %s",
+			    vpath, _pam_sm_func_name[i], dlerror());
+	}
 	return (module);
  buf_err:
 	openpam_log(PAM_LOG_ERROR, "%m");

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204150631.g3F6VVZ13705>