Subject: pkg/14709: www/gtkgtml (libtool) is forkbomb when . is at start of $PATH
To: None <gnats-bugs@gnats.netbsd.org>
From: Olaf Seibert <rhialto@polderland.nl>
List: netbsd-bugs
Date: 11/24/2001 16:12:10
>Number: 14709
>Category: pkg
>Synopsis: www/gtkgtml (libtool) is forkbomb when . is at start of $PATH
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Nov 24 07:27:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Olaf Seibert
>Release: pkgsrc of some weeks ago
>Organization:
>Environment:
System: NetBSD klei.intern.polderland.nl 1.4.2 NetBSD 1.4.2 (KIELDRECHT) #15: Wed Jul 11 18:02:11 CEST 2001 root@klei.intern.polderland.nl:/usr/src/sys/arch/i386/compile/KIELDRECHT i386
>Description:
When building package www/gtkgtml there is a script created
with the name "test":
/tmp/www/gtkhtml/work/gtkhtml-0.14.0/components/ebrowser/test.
When running gmake in that ebrowser directory, at one point
the command /bin/sh ../../libtool --mode=link cc ... is called.
This apparently uses the test script. The start of the test script
looks like:
# test - temporary wrapper script for .libs/test
# Generated by ltmain.sh - GNU libtool 1.4a (1.641.2.179 2001/02/15 21:55:40)
and further contains calls of test (where it meant /bin/test),
some of which are:
if test "${CDPATH+set}" = set; then CDPATH=:; export CDPATH; fi
if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then
if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
if test "X$1" = X--no-reexec; then
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
test "x$thisdir" = "x$file" && thisdir=.
while test -n "$file"; do
if test "x$destdir" != "x$file"; then
test -n "$absdir" && thisdir="$absdir"
if test -f "$progdir/$program"; then
if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
The result is a fork bomb if . is listed in $PATH before
/usr/bin.
Now that I'm thinking of it, probably ../../libtool did not even
mean to invoke ./test, but /bin/test itself, so calling ./test
was probably wrong in the first place.
>How-To-Repeat:
$PATH=.:$PATH
cd /usr/src/pkgsrc/www/gtkgtml
make
>Fix:
workaround: change PATH before running make to exclude ".".
workaround when the make is already in progress: hope you have
another shell handy, hope you did not run the make as root,
and attempt to remove or rename the test script. Interrupts
don't seem to help.
real fix: teach libtool to use proper full pathnames in all
scripts it uses and/or generates.
I will also attempt to send this to bug reporting addresses of
gnome and libtool.
-Olaf.
--
___ Olaf 'Rhialto' Seibert - rhialto@polder --They that can give up essential
\X/ land.nl --liberty to purchase a little temporary safety
--------------deserve neither liberty or safety. - Benjamin Franklin, 1759
---People will accept your ideas much more readily if you tell them that
---Benjamin Franklin said it first. - Unknown
>Release-Note:
>Audit-Trail:
>Unformatted: