openbsd-ports/net/darkstat/patches/patch-configure_ac
brad 8ad9bf4678 Update to darkstat 3.0.718.
- Contains additional time_t related fixes.
- The author removed an assertion in timer_stop() I had run into and even
  though monotonic time is used somehow time went backwards.
- Change the rc.d script to use localhost instead of 127.0.0.1 to have
  darkstat also bind to the v6 address.

ok sthen@
2014-02-07 08:56:53 +00:00

39 lines
1.3 KiB
Plaintext

$OpenBSD: patch-configure_ac,v 1.3 2014/02/07 08:56:53 brad Exp $
Re-instate the chroot by default code.
--- configure.ac.orig Thu Feb 6 02:47:13 2014
+++ configure.ac Thu Feb 6 02:47:48 2014
@@ -6,6 +6,31 @@ AC_CONFIG_HEADER([config.h])
RULE="------------------------------------------------------------"
+# Let user specify CHROOT_DIR, or else autodetect it, or else die.
+AC_ARG_WITH(chroot-dir, AS_HELP_STRING([--with-chroot-dir],
+ [specify the chroot directory (default: /var/empty)]),
+ [if test "x$withval" = "xyes"; then
+ AC_MSG_ERROR([please specify --with-chroot-dir=/path/to/darkstat/chroot])
+ fi
+ _chd="$withval"],
+ [# Find an "empty" directory to serve as the chroot.
+ _chd="/var/empty"
+ AC_MSG_CHECKING([for $_chd])
+ if test -d $_chd ; then
+ AC_MSG_RESULT(found it)
+ else
+ AC_MSG_RESULT(not there)
+ _chd="/var/lib/empty"
+ AC_MSG_CHECKING([for $_chd])
+ if test -d $_chd ; then
+ AC_MSG_RESULT(found it)
+ else
+ AC_MSG_RESULT(not there either)
+ AC_MSG_ERROR([please specify --with-chroot-dir=/path/to/darkstat/chroot])
+ fi
+ fi])
+AC_DEFINE_UNQUOTED(CHROOT_DIR, "$_chd", [Default chroot directory.])
+
# Allow configure-time override of PRIVDROP_USER.
AC_ARG_WITH(privdrop-user, AS_HELP_STRING([--with-privdrop-user],
[specify which user to drop privileges to (default: nobody)]),