From: Bob Friesenhahn Date: Sat, 14 Nov 2009 19:52:24 +0000 (-0600) Subject: Don't load module.la from current directory by default. X-Git-Tag: v2.2.6b~2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=472f309d078dec8e24259aaff697f5f730f5efef;p=thirdparty%2Flibtool.git 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. --- diff --git a/ChangeLog b/ChangeLog index 851714740..bf52f46b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-11-14 Bob Friesenhahn + + 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 Only use preopen loader to load preopened archives diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 1ce4479b0..7c426351c 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -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); } diff --git a/tests/testsuite.at b/tests/testsuite.at index 5037d1429..c5898fdcd 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -288,9 +288,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; }