mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
fix bug #195.
git-svn-id: file:///svn/unbound/trunk@1155 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
71d292580b
commit
4e2ca85842
9 changed files with 900 additions and 2668 deletions
9
aclocal.m4
vendored
9
aclocal.m4
vendored
|
|
@ -1,7 +1,7 @@
|
||||||
# generated automatically by aclocal 1.10 -*- Autoconf -*-
|
# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||||
# 2005, 2006 Free Software Foundation, Inc.
|
# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
@ -565,6 +565,7 @@ s390*-*linux*|sparc*-*linux*)
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
*64-bit*)
|
*64-bit*)
|
||||||
|
libsuff=64
|
||||||
case $host in
|
case $host in
|
||||||
x86_64-*kfreebsd*-gnu)
|
x86_64-*kfreebsd*-gnu)
|
||||||
LD="${LD-ld} -m elf_x86_64_fbsd"
|
LD="${LD-ld} -m elf_x86_64_fbsd"
|
||||||
|
|
@ -1623,11 +1624,13 @@ linux* | k*bsd*-gnu)
|
||||||
# Some rework will be needed to allow for fast_install
|
# Some rework will be needed to allow for fast_install
|
||||||
# before this can be enabled.
|
# before this can be enabled.
|
||||||
hardcode_into_libs=yes
|
hardcode_into_libs=yes
|
||||||
|
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
|
||||||
|
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
|
||||||
|
|
||||||
# Append ld.so.conf contents to the search path
|
# Append ld.so.conf contents to the search path
|
||||||
if test -f /etc/ld.so.conf; then
|
if test -f /etc/ld.so.conf; then
|
||||||
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
|
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
|
||||||
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
||||||
|
|
|
||||||
|
|
@ -281,6 +281,9 @@
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
#undef STDC_HEADERS
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* default username */
|
||||||
|
#undef UB_USERNAME
|
||||||
|
|
||||||
/* use statistics for allocs and frees, for debug use */
|
/* use statistics for allocs and frees, for debug use */
|
||||||
#undef UNBOUND_ALLOC_STATS
|
#undef UNBOUND_ALLOC_STATS
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,14 @@ AC_ARG_WITH(pidfile,
|
||||||
AC_SUBST(UNBOUND_PIDFILE)
|
AC_SUBST(UNBOUND_PIDFILE)
|
||||||
AC_DEFINE_UNQUOTED(PIDFILE, ["$UNBOUND_PIDFILE"], [default pidfile location])
|
AC_DEFINE_UNQUOTED(PIDFILE, ["$UNBOUND_PIDFILE"], [default pidfile location])
|
||||||
|
|
||||||
|
AC_ARG_WITH(username,
|
||||||
|
AC_HELP_STRING([--with-username=user],
|
||||||
|
[set default user that unbound changes to (default user is unbound)]),
|
||||||
|
UNBOUND_USERNAME="$withval",
|
||||||
|
UNBOUND_USERNAME="unbound")
|
||||||
|
AC_SUBST(UNBOUND_USERNAME)
|
||||||
|
AC_DEFINE_UNQUOTED(UB_USERNAME, ["$UNBOUND_USERNAME"], [default username])
|
||||||
|
|
||||||
AC_DEFINE(WINVER, 0x0502, [the version of the windows API enabled])
|
AC_DEFINE(WINVER, 0x0502, [the version of the windows API enabled])
|
||||||
|
|
||||||
dnl routine to help check for compiler flags.
|
dnl routine to help check for compiler flags.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
17 July 2008: Wouter
|
17 July 2008: Wouter
|
||||||
- fix bug #196, compile outside source tree.
|
- fix bug #196, compile outside source tree.
|
||||||
|
- fix bug #195, add --with-username=user configure option.
|
||||||
|
|
||||||
16 July 2008: Wouter
|
16 July 2008: Wouter
|
||||||
- made svn tag 1.0.1, trunk now 1.0.2
|
- made svn tag 1.0.1, trunk now 1.0.2
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,9 @@ This software is under BSD license, see LICENSE for details.
|
||||||
* --with-chroot-dir=path
|
* --with-chroot-dir=path
|
||||||
Set default chroot directory,
|
Set default chroot directory,
|
||||||
the default is /usr/local/etc/unbound.
|
the default is /usr/local/etc/unbound.
|
||||||
|
* --with-username=user
|
||||||
|
Set default user name to change to,
|
||||||
|
the default is the "unbound" user.
|
||||||
|
|
||||||
* 'make test' attempts to run a series of tests, depending on the support
|
* 'make test' attempts to run a series of tests, depending on the support
|
||||||
programs that are installed.
|
programs that are installed.
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ server:
|
||||||
# if given, user privileges are dropped (after binding port),
|
# if given, user privileges are dropped (after binding port),
|
||||||
# and the given username is assumed. Default is user "unbound".
|
# and the given username is assumed. Default is user "unbound".
|
||||||
# If you give "" no privileges are dropped.
|
# If you give "" no privileges are dropped.
|
||||||
# username: "unbound"
|
# username: "@UNBOUND_USERNAME@"
|
||||||
|
|
||||||
# the working directory. The relative files in this config are
|
# the working directory. The relative files in this config are
|
||||||
# relative to this directory. If you give "" the working directory
|
# relative to this directory. If you give "" the working directory
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,7 @@ If given a chroot is done to the given directory. The default is
|
||||||
.TP
|
.TP
|
||||||
.B username: \fI<name>
|
.B username: \fI<name>
|
||||||
If given, after binding the port the user privileges are dropped. Default is
|
If given, after binding the port the user privileges are dropped. Default is
|
||||||
"unbound". If you give username: "" no user change is performed.
|
"@UNBOUND_USERNAME@". If you give username: "" no user change is performed.
|
||||||
.IP
|
.IP
|
||||||
If this user is not capable of binding the
|
If this user is not capable of binding the
|
||||||
port, reloads (by signal HUP) will still retain the opened ports.
|
port, reloads (by signal HUP) will still retain the opened ports.
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ config_create()
|
||||||
if(!(cfg->outgoing_avail_ports = (int*)calloc(65536, sizeof(int))))
|
if(!(cfg->outgoing_avail_ports = (int*)calloc(65536, sizeof(int))))
|
||||||
goto error_exit;
|
goto error_exit;
|
||||||
init_outgoing_availports(cfg->outgoing_avail_ports, 65536);
|
init_outgoing_availports(cfg->outgoing_avail_ports, 65536);
|
||||||
if(!(cfg->username = strdup("unbound"))) goto error_exit;
|
if(!(cfg->username = strdup(UB_USERNAME))) goto error_exit;
|
||||||
#ifdef HAVE_CHROOT
|
#ifdef HAVE_CHROOT
|
||||||
if(!(cfg->chrootdir = strdup(CHROOT_DIR))) goto error_exit;
|
if(!(cfg->chrootdir = strdup(CHROOT_DIR))) goto error_exit;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue