diff options
author | bnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68> | 2003-01-07 19:40:05 +0000 |
---|---|---|
committer | bnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68> | 2003-01-07 19:40:05 +0000 |
commit | 32fb15db413f04f12adcb6ce7aa5a4a843b98632 (patch) | |
tree | f189456a5ed531d95a237560303c628fd1a9e1bb /dso | |
parent | 65517e0a3ba283bcf9eb4db52216dd813f6cad80 (diff) | |
download | libapr-32fb15db413f04f12adcb6ce7aa5a4a843b98632.tar.gz |
Normalize the path before trying to load the module.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64276 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dso')
-rw-r--r-- | dso/netware/dso.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/dso/netware/dso.c b/dso/netware/dso.c index 7fd3d27e0..ffb0530b9 100644 --- a/dso/netware/dso.c +++ b/dso/netware/dso.c @@ -107,7 +107,16 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle, const char *path, apr_pool_t *pool) { - void *os_handle = dlopen(path, RTLD_NOW | RTLD_LOCAL); + void *os_handle = NULL; + char *fullpath = NULL; + apr_status_t rv; + + if ((rv = apr_filepath_merge(&fullpath, NULL, path, + APR_FILEPATH_NATIVE, pool)) != APR_SUCCESS) { + return rv; + } + + os_handle = dlopen(fullpath, RTLD_NOW | RTLD_LOCAL); *res_handle = apr_pcalloc(pool, sizeof(**res_handle)); @@ -120,7 +129,7 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle, (*res_handle)->pool = pool; (*res_handle)->errormsg = NULL; (*res_handle)->symbols = NULL; - (*res_handle)->path = apr_pstrdup(pool, path); + (*res_handle)->path = apr_pstrdup(pool, fullpath); apr_pool_cleanup_register(pool, *res_handle, dso_cleanup, apr_pool_cleanup_null); |