nessus-core "configure" bugs

Stephen Friedl <[email protected]>
Newsgroups gmane.comp.security.nessus.devel
Message-ID <[email protected]>
Hello all,

While building nessus-core 1.2.7 and 1.3.4 on Red Hat 8.0, I found several
outright bugs in the "configure.in" script. plus code that relies on
non-POSIX behavior fo the shell. I have patches for both versions,
and I include the common patch header text here.

You can follow the links included to get the patches themselves.

Steve

--- 
Stephen J Friedl | Software Consultant | Tustin, CA |   +1 714 544-6561
www.unixwiz.net  | I speak for me only |   KA8CMY   | [email protected]


 From: Stephen J. Friedl <[email protected]>
 Date: Mon Feb 24 03:38:59 PST 2003
 For:  nessus-core 1.2.7(stable) 1.3.4(unstable)
 Subj: numerous nessus-core "configure" issues

 Patch built with:

	LC_ALL=C TZ=UTC0 diff -Naur configure.in.orig configure.in > patch.txt

 These Patch locations:

	http://www.unixwiz.net/patches/nessus-core-1.2.7-config-patch.txt
	http://www.unixwiz.net/patches/nessus-core-1.3.4-config-patch.txt

While building nessus-core, under Red Hat Linux 8.0, we found problems
with configure. A few are outright bugs, while others look like
idiosynchracies. These two patches fix all of them, and we're including
the same patch header on both because they fix the same problems.

Problem #1 - the AC_PATH_PROG() autoconf macro is used to locate
	programs such as gtk-config in the system path, and it's
	called like

	AC_PATH_PROG(GTKCONFIG, gtk-config,,$XPATH:$PATH)

	If it's found, the GTKCONFIG variable is set to the full path.

	The problem is that the autoconf-generated shell code tries to
	run through the path with something like this:

		IFS=:
		for ac_dir in $XPATH:$PATH
		do
			# try stuff with $dir
		done

	POSIX says that IFS expansion is only supposed to occur during
	variable expansion (inside $XPATH and $PATH), so the colon
	separating the two variables is NOT supposed to be a word
	boundary.

	Plenty of older shells exhibit non-POSIX behavior, but newer
	ones do not, and it behooves us to stop depending on on the
	nonportable behavior.

	By setting $XPATH to be the entire path, not just the "auxilliary"
	path, and using just this one variable in AC_PATH_PROG, this
	obviates the problem altogether.

	Those curious to read about this bash issue can find it here:

	http://mail.gnu.org/archive/html/bug-bash/2001-07/msg00083.html

Problem #2: if only GTK 2 is found, the configure script generates a
	warning messages that suggests we complain to the GTK people.
	But since this is done from the AC_WARN macro, the *comma*
	in the warning text is treated as an argument separator, so
	everything after this is silently truncated. We changed the
	comma to a dash.

Problem #3: At one point $PKGCONFIG is misspelled $PKGONFIG

Problem #4: an unsuccessful search for pkg-config incorrectly reports
	"gtk-config not found".

---

Apply the patches and rebuild:

	# cd /source/nessus-core
	# patch -p0 < /tmp/patchfile.txt		 or wherever
	# autoconf configure.in > configure
	# ./configure

Our testing used autoconf 2.53
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.