diff options
author | brian <brian@cvs.openbsd.org> | 1998-01-19 22:59:15 +0000 |
---|---|---|
committer | brian <brian@cvs.openbsd.org> | 1998-01-19 22:59:15 +0000 |
commit | cc57fbede1fd6fc58f281f4f593bd8683dc94b34 (patch) | |
tree | f91b6f16c2778e991a348401d222d2d184730de6 | |
parent | a8ed6ff0f782e52ec19eb15892803b8a2d9cc8ee (diff) |
dlopen(..., RTLD_NOW) rather than RTLD_LAZY.
Pointed out by: John Polstra <jdp@polstra.com>
-rw-r--r-- | usr.sbin/ppp/loadalias.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/ppp/loadalias.c b/usr.sbin/ppp/loadalias.c index e44eff70e71..0c3c8575cc3 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.3 1998/01/14 01:23:50 brian Exp $ + * $Id: loadalias.c,v 1.4 1998/01/19 22:59:14 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); } } } |