From e91f7b960032074a55fc91273c1917e3082b5338 Mon Sep 17 00:00:00 2001 From: Bob Friesenhahn Date: Sat, 14 Nov 2009 13:52:24 -0600 Subject: [PATCH] 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. --- ChangeLog | 10 ++++++++++ libltdl/ltdl.c | 2 +- tests/testsuite.at | 4 ++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f4c2c4070..6dc22980d 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 ddb9c28da..24ee13f1d 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 e9226eee1..34f7f216a 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -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; } -- 2.47.2