Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 May 2003 05:42:12 -0700 (PDT)
From:      Dag-Erling Smorgrav <des@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 31068 for review
Message-ID:  <200305131242.h4DCgCkD006680@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=31068

Change 31068 by des@des.at.des.thinksec.com on 2003/05/13 05:42:04

	Use RTLD_LAZY rather than RTLD_NOW (which apparently isn't supported
	on all platforms, notably OpenBSD).
	
	Submitted by:	Mike Petullo <mike@flyn.org>

Affected files ...

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

Differences ...

==== //depot/projects/openpam/lib/openpam_dynamic.c#8 (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#7 $
+ * $P4: //depot/projects/openpam/lib/openpam_dynamic.c#8 $
  */
 
 #include <dlfcn.h>
@@ -64,10 +64,10 @@
 	/* try versioned module first, then unversioned module */
 	if (asprintf(&vpath, "%s.%d", path, LIB_MAJ) == -1)
 		goto buf_err;
-	if ((dlh = dlopen(vpath, RTLD_NOW)) == NULL) {
+	if ((dlh = dlopen(vpath, RTLD_LAZY)) == NULL) {
 		openpam_log(PAM_LOG_DEBUG, "%s: %s", vpath, dlerror());
 		*strrchr(vpath, '.') = '\0';
-		if ((dlh = dlopen(vpath, RTLD_NOW)) == NULL) {
+		if ((dlh = dlopen(vpath, RTLD_LAZY)) == NULL) {
 			openpam_log(PAM_LOG_DEBUG, "%s: %s", vpath, dlerror());
 			free(module);
 			return (NULL);



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