]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Respect --without-chroot correctly
authorPeter Volkov <[email protected]>
Fri, 2 Apr 2010 05:33:30 +0000 (09:33 +0400)
committerGuy Harris <[email protected]>
Fri, 2 Apr 2010 05:55:22 +0000 (22:55 -0700)
./configure --without-chroot will configure tcpdump with "no" as the
value of chroot directory and cause tcpdump to fail with:

tcpdump: Couldn't chroot/chdir to 'no': No such file or directory

This patch makes ./configure to avoid chroot directory when called with
--without-chroot.

configure.in

index 6445738ee6b6bac193eca01c964f0fa18c81ef54..1a8c4a17c39986d12710855ed1f6a56062009845 100644 (file)
@@ -181,7 +181,7 @@ fi
 
 AC_ARG_WITH(chroot, [  --with-chroot=DIRECTORY when dropping privileges, chroot to DIRECTORY])
 AC_MSG_CHECKING([whether to chroot])
-if test ! -z "$with_chroot" ; then
+if test ! -z "$with_chroot" && test "$with_chroot" != "no" ; then
         AC_DEFINE_UNQUOTED(WITH_CHROOT, "$withval")
        AC_MSG_RESULT(to \"$withval\")
 else