Don't load module.la from current directory by default.

* libltdl/ltdl.c (try_dlopen): Do not attempt to load an
unqualified module.la file from the current directory (by
default) since doing so is insecure and is not compliant with
the documentation.
* tests/testsuite.at: Qualify access to module.la file in
current directory so that test passes.
This commit is contained in:
Bob Friesenhahn 2009-11-14 13:52:24 -06:00 committed by Peter O'Gorman
parent 3580cddcea
commit e91f7b9600
3 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,13 @@
2009-11-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
Don't load module.la from current directory by default.
* libltdl/ltdl.c (try_dlopen): Do not attempt to load an
unqualified module.la file from the current directory (by
default) since doing so is insecure and is not compliant with
the documentation.
* tests/testsuite.at: Qualify access to module.la file in
current directory so that test passes.
2009-11-14 Peter O'Gorman <peter@pogma.com>
Only use preopen loader to load preopened archives

View File

@ -1346,7 +1346,7 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext,
}
#endif
}
if (!file)
else
{
file = fopen (attempt, LT_READTEXT_MODE);
}

View File

@ -336,9 +336,9 @@ main ()
return 1;
}
module = lt_dlopen("module.la");
module = lt_dlopen("./module.la");
if (!module) {
fprintf (stderr, "error dlopening module.la: %s\n", lt_dlerror());
fprintf (stderr, "error dlopening ./module.la: %s\n", lt_dlerror());
goto finish;
}