summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-01-19 22:59:57 +0000
committerbrian <brian@FreeBSD.org>1998-01-19 22:59:57 +0000
commit8c6e8375e32c0cd23b36065287f14e6de40ed378 (patch)
tree6ada67ddacb753d596a8846a0339c5f09d4b37a0 /usr.sbin/ppp
parentd93811908a3f6490d2137544537d1044c6e08ee6 (diff)
downloadFreeBSD-src-8c6e8375e32c0cd23b36065287f14e6de40ed378.zip
FreeBSD-src-8c6e8375e32c0cd23b36065287f14e6de40ed378.tar.gz
dlopen(..., RTLD_NOW) rather than RTLD_LAZY.
Pointed out by: John Polstra <jdp@polstra.com>
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/loadalias.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/ppp/loadalias.c b/usr.sbin/ppp/loadalias.c
index 1125f63..a95de65 100644
--- a/usr.sbin/ppp/loadalias.c
+++ b/usr.sbin/ppp/loadalias.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: loadalias.c,v 1.12 1997/12/21 12:11:06 brian Exp $
+ * $Id: loadalias.c,v 1.13 1998/01/14 01:23:05 brian Exp $
*/
#include <sys/param.h>
@@ -51,6 +51,10 @@
#define off(item) ((int)&(((struct aliasHandlers *)0)->item))
#define entry(a) { off(a), "_" #a }
+#ifndef RTLD_NOW
+#define RTLD_NOW 1 /* really RTLD_LAZY */
+#endif
+
static struct {
int offset;
const char *name;
@@ -86,7 +90,7 @@ loadAliasHandlers(struct aliasHandlers * h)
LogPrintf(LogALERT, "Ignoring environment _PATH_ALIAS_PREFIX"
" value (%s)\n", env);
- dl = dlopen(path, RTLD_LAZY);
+ dl = dlopen(path, RTLD_NOW);
if (dl == (void *) 0) {
/* Look for _PATH_ALIAS_PREFIX with any number appended */
int plen;
@@ -129,7 +133,7 @@ loadAliasHandlers(struct aliasHandlers * h)
if (maxver > -1) {
sprintf(p + plen, "%ld", maxver);
- dl = dlopen(p, RTLD_LAZY);
+ dl = dlopen(p, RTLD_NOW);
}
}
}
OpenPOWER on IntegriCloud