libtool-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Libtool branch, redo-v2.2.6-release, updated. v2.2.6a-4-g68a65


From: Peter O'Gorman
Subject: [SCM] GNU Libtool branch, redo-v2.2.6-release, updated. v2.2.6a-4-g68a6555
Date: Sun, 15 Nov 2009 22:03:31 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Libtool".

The branch, redo-v2.2.6-release has been updated
       via  68a6555c1bc5e5c7f12be0506ca6591a94008977 (commit)
       via  472f309d078dec8e24259aaff697f5f730f5efef (commit)
       via  64da075aba6488dadca1b110d961dcf1ad125f15 (commit)
       via  c920a14ab7040428e51629a391efbd85073258d0 (commit)
      from  1d7d1f2c4b45bc98870d60b1af08c0fa851fedd2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 68a6555c1bc5e5c7f12be0506ca6591a94008977
Author: Peter O'Gorman <address@hidden>
Date:   Sat Nov 14 13:58:19 2009 -0600

    Prepare for 2.2.6b release.
    
    NEWS, configure.ac, libltdl/configure.ac, libltdl/Makefile.am:
    Update.

commit 472f309d078dec8e24259aaff697f5f730f5efef
Author: Bob Friesenhahn <address@hidden>
Date:   Sat Nov 14 13:52:24 2009 -0600

    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.

commit 64da075aba6488dadca1b110d961dcf1ad125f15
Author: Peter O'Gorman <address@hidden>
Date:   Sat Nov 14 13:47:10 2009 -0600

    Only use preopen loader to load preopened archives
    
    * libltdl/ltdl.c: Limit checking of .a to preopen loader.
    * tests/lt_dlopen_a.at: Add test.
    * Makefile.am: Add test.

commit c920a14ab7040428e51629a391efbd85073258d0
Author: Ralf Wildenhues <address@hidden>
Date:   Tue May 5 07:39:16 2009 +0200

    libtoolize: ignore trailing junk on scriptversion line.
    
    * libtoolize.m4sh (func_install_update): Ignore semi-colon or
    comment-sign and all following characters when parsing a
    `scriptversion' line in one of the auxiliary scripts; recent
    Automake-provided script have a stylized comment to induce
    Emacs to use UTC.
    Exposed by the `libtoolize config files serial update' test.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog            |   33 +++++++++++++++++
 Makefile.am          |    1 +
 NEWS                 |   11 ++++++
 configure.ac         |    2 +-
 libltdl/configure.ac |    2 +-
 libltdl/ltdl.c       |    5 ++-
 libtoolize.m4sh      |    1 +
 tests/lt_dlopen_a.at |   97 ++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/testsuite.at   |    4 +-
 9 files changed, 150 insertions(+), 6 deletions(-)
 create mode 100644 tests/lt_dlopen_a.at

diff --git a/ChangeLog b/ChangeLog
index 71fc948..215b2f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,36 @@
+2009-11-14  Peter O'Gorman  <address@hidden>
+
+       Prepare for 2.2.6b release.
+       * NEWS, configure.ac, libltdl/configure.ac, libltdl/Makefile.am:
+       Update.
+
+2009-11-14  Bob Friesenhahn  <address@hidden>
+
+       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  <address@hidden>
+
+       Only use preopen loader to load preopened archives
+       * libltdl/ltdl.c: Limit checking of .a to preopen loader.
+       * tests/lt_dlopen_a.at: Add test.
+       * Makefile.am: Add test.
+
+2009-05-05  Ralf Wildenhues  <address@hidden>
+
+       libtoolize: ignore trailing junk on scriptversion line.
+       * libtoolize.m4sh (func_install_update): Ignore semi-colon or
+       comment-sign and all following characters when parsing a
+       `scriptversion' line in one of the auxiliary scripts; recent
+       Automake-provided script have a stylized comment to induce
+       Emacs to use UTC.
+       Exposed by the `libtoolize config files serial update' test.
+
 2008-09-07  Gary V. Vaughan  <address@hidden>
 
        Fix typo in Makefile.maint.
diff --git a/Makefile.am b/Makefile.am
index 1417e84..2d33f73 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -454,6 +454,7 @@ TESTSUITE_AT        = tests/testsuite.at \
                  tests/am-subdir.at \
                  tests/lt_dlexit.at \
                  tests/lt_dladvise.at \
+                 tests/lt_dlopen_a.at \
                  tests/ltdl-api.at \
                  tests/need_lib_prefix.at \
                  tests/standalone.at \
diff --git a/NEWS b/NEWS
index dfdc48b..d2d05be 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,16 @@
 NEWS - list of user-visible changes between releases of GNU Libtool
 
+New in 2.2.6b 2009-11-14: Libtool team:
+
+* Bug fixes:
+
+  - Fixed libltdl to no longer attempt to dlopen() the old_library
+    listed in the .la file. Now will use only the preopen loader to
+    attempt to load it. This may be a security issue, all users are
+    advised to upgrade.
+  - Similarly, don't open module.la from the current directory, this
+    changes the behavior of libltdl to match the documentation.
+
 New in 2.2.6 2008-09-05: git version 2.2.5a, Libtool team:
 
 * New features:
diff --git a/configure.ac b/configure.ac
index 9cf7131..3e20121 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,7 +30,7 @@ dnl Oldest automake required for bootstrap is below in 
AM_INIT_AUTOMAKE.
 ## ------------------------ ##
 ## Autoconf initialisation. ##
 ## ------------------------ ##
-AC_INIT([libtool], [2.2.6], address@hidden)
+AC_INIT([libtool], [2.2.6b], address@hidden)
 AC_CONFIG_HEADERS([config.h:config-h.in])
 AC_CONFIG_SRCDIR([libtoolize.in])
 LT_CONFIG_LTDL_DIR([libltdl], [nonrecursive])
diff --git a/libltdl/configure.ac b/libltdl/configure.ac
index bb13fba..6403c68 100644
--- a/libltdl/configure.ac
+++ b/libltdl/configure.ac
@@ -40,7 +40,7 @@ AC_PREREQ(2.59)dnl We use AS_HELP_STRING
 ## ------------------------ ##
 ## Autoconf initialisation. ##
 ## ------------------------ ##
-AC_INIT([libltdl], [2.2.6], address@hidden)
+AC_INIT([libltdl], [2.2.6b], address@hidden)
 AC_CONFIG_HEADERS([config.h:config-h.in])
 AC_CONFIG_SRCDIR([ltdl.c])
 AC_CONFIG_AUX_DIR([config])
diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c
index 6e19599..7c42635 100644
--- a/libltdl/ltdl.c
+++ b/libltdl/ltdl.c
@@ -529,7 +529,8 @@ find_module (lt_dlhandle *handle, const char *dir, const 
char *libdir,
   /* Try to open the old library first; if it was dlpreopened,
      we want the preopened version of it, even if a dlopenable
      module is available.  */
-  if (old_name && tryall_dlopen (handle, old_name, advise, 0) == 0)
+  if (old_name && tryall_dlopen (handle, old_name,
+                         advise, lt_dlloader_find ("lt_preopen") ) == 0)
     {
       return 0;
     }
@@ -1345,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/libtoolize.m4sh b/libtoolize.m4sh
index 42e07df..75e2d23 100644
--- a/libtoolize.m4sh
+++ b/libtoolize.m4sh
@@ -1017,6 +1017,7 @@ func_install_update ()
     $opt_debug
     my_sed_install='
        /^scriptversion='\''*[0-9][1-9.-]*'\''*/ {
+           s,[#;].*,,
            s,^scriptversion='\''*\([0-9.-]*\)'\''*,\1,
            s/-/./g
            p
diff --git a/tests/lt_dlopen_a.at b/tests/lt_dlopen_a.at
new file mode 100644
index 0000000..8ab5c50
--- /dev/null
+++ b/tests/lt_dlopen_a.at
@@ -0,0 +1,97 @@
+# lt_dlopen_a.at -- test libltdl functionality                -*- Autotest -*-
+#
+#   Copyright (C) 2009 Free Software Foundation, Inc.
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from  http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+####
+
+AT_SETUP([lt_dlopen archive])
+AT_KEYWORDS([libltdl lt_dlopen_a])
+
+AT_DATA([main.c],
+[[#include <ltdl.h>
+#include <stdio.h>
+
+/* This dlopen() in the main executable should override any dlopen()s in
+   shared libraries etc.
+
+   If that is not the case (or the platform does not use dlopen()) then this
+   test should exit 77, causing the test to SKIP.
+*/
+static int retcde = 77;
+
+void * dlopen(const char *path, int mode) {
+  if (!(strcmp(path,"plugin.a") && strcmp(path,"plugin.lib")))
+    {
+      fprintf(stderr,"Tried to open archive %s\n",path);
+      retcde = 1;
+    }
+  else
+    {
+      fprintf(stderr,"Opening ... %s\n", path);
+      if (retcde == 77) retcde = 0;
+    }
+  return NULL;
+}
+
+int
+main (int argc, char* argv[])
+{
+  int err = 0;
+  lt_dlhandle plugin_handle;
+
+  lt_dlinit ();
+  plugin_handle = lt_dlopenext (argv[1]);
+  lt_dlexit ();
+  return retcde;
+}
+]])
+
+AT_DATA([plugin.c],
+[[
+int i = 1;
+]])
+
+: ${LTDLINCL="-I$abs_top_srcdir/libltdl"}
+: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"}
+
+CPPFLAGS="$LTDLINCL $CPPFLAGS"
+inst=`pwd`/inst
+libdir=$inst/lib
+bindir=$inst/bin
+
+AT_CHECK([$CC $CPPFLAGS $CFLAGS -c main.c || exit 77],[],[ignore],[ignore])
+AT_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c plugin.c || exit 
77],
+        [], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o plugin.la -rpath ]dnl
+        [$libdir -module -no-undefined -avoid-version plugin.lo || exit 77],
+        [], [ignore], [ignore])
+
+AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT ]dnl
+        [main.$OBJEXT -dlopen plugin.la $LIBLTDL || exit 77],
+        [], [ignore], [ignore])
+
+mkdir -p $libdir
+mkdir -p $bindir
+
+AT_CHECK([$LIBTOOL --mode=install cp plugin.la $libdir],[], [ignore], [ignore])
+AT_CHECK([$LIBTOOL --mode=install cp main$EXEEXT $bindir],[], [ignore], 
[ignore])
+AT_CHECK([test -f $libdir/plugin.a || exit 77])
+LT_AT_EXEC_CHECK([$bindir/main $libdir/plugin.la], [], [ignore], [ignore])
+
+AT_CLEANUP
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 5037d14..c5898fd 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;
   }
 


hooks/post-receive
-- 
GNU Libtool




reply via email to

[Prev in Thread] Current Thread [Next in Thread]