diff options
author | Richard Levitte <levitte@openssl.org> | 2001-03-14 13:30:07 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2001-03-14 13:30:07 +0000 |
commit | d58eb72f25b8a5195307d26a1c52c4dddde9ffa2 (patch) | |
tree | 87d84d20d1fd5e301479dabdcd72803d33ab6703 /crypto/dso | |
parent | 11bfaf6cff21d7768ef83c9e3094dd930b824793 (diff) | |
download | openssl-d58eb72f25b8a5195307d26a1c52c4dddde9ffa2.tar.gz |
On HP-UX 10, shareable libraries end with '.sl', not '.so'.
In part reported by Lynn Gazis <lgazis@IVEA.com>. The rest of the
report is about SHLIB_PATH being ignored. It was decided that using
it would break security.
Diffstat (limited to 'crypto/dso')
-rw-r--r-- | crypto/dso/dso_dl.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/crypto/dso/dso_dl.c b/crypto/dso/dso_dl.c index f661ec5bfb..1a898c5407 100644 --- a/crypto/dso/dso_dl.c +++ b/crypto/dso/dso_dl.c @@ -111,6 +111,11 @@ DSO_METHOD *DSO_METHOD_dl(void) * type so the cast is safe. */ +#if defined(__hpux) +static const char extension[] = ".sl"; +#else +static const char extension[] = ".so"; +#endif static int dl_load(DSO *dso, const char *filename) { shl_t ptr; @@ -118,12 +123,12 @@ static int dl_load(DSO *dso, const char *filename) int len; /* The same comment as in dlfcn_load applies here. bleurgh. */ - len = strlen(filename); + len = strlen(filename) + len(extension); if((dso->flags & DSO_FLAG_NAME_TRANSLATION) && - (len + 6 < DSO_MAX_TRANSLATED_SIZE) && + (len + 3 < DSO_MAX_TRANSLATED_SIZE) && (strstr(filename, "/") == NULL)) { - sprintf(translated, "lib%s.so", filename); + sprintf(translated, "lib%s%s", filename, extension); ptr = shl_load(translated, BIND_IMMEDIATE, NULL); } else |