Commit 1a6bca81 authored by Simon Kelley's avatar Simon Kelley

import of dnsmasq-2.43.tar.gz

parent 9e038946
...@@ -2506,3 +2506,79 @@ version 2.42 ...@@ -2506,3 +2506,79 @@ version 2.42
Chekholko for bug reports and help debugging. Chekholko for bug reports and help debugging.
Support netascii transfer mode for TFTP. Support netascii transfer mode for TFTP.
version 2.43
Updated Polish translation. Thanks to Jan Psota.
Flag errors when configuration options are repeated
illegally.
Further tweaks for GNU/kFreeBSD
Add --no-wrap to msgmerge call - provides nicer .po file
format.
Honour lease-time spec in dhcp-host lines even for
BOOTP. The user is assumed to known what they are doing in
this case. (Hosts without the time spec still get infinite
leases for BOOTP, over-riding the default in the
dhcp-range.) Thanks to Peter Katzmann for uncovering this.
Fix problem matching relay-agent ids. Thanks to Michael
Rack for the bug report.
Add --naptr-record option. Suggestion from Johan
Bergquist.
Implement RFC 5107 server-id-override DHCP relay agent
option.
Apply patches from Stefan Kruger for compilation on
Solaris 10 under Sun studio.
Yet more tweaking of Linux capability code, to suppress
pointless wingeing from kernel 2.6.25 and above.
Improve error checking during startup. Previously, some
errors which occurred during startup would be worked
around, with dnsmasq still starting up. Some were logged,
some silent. Now, they all cause a fatal error and dnsmasq
terminates with a non-zero exit code. The errors are those
associated with changing uid and gid, setting process
capabilities and writing the pidfile. Thanks to Uwe
Gansert and the Suse security team for pointing out
this improvement, and Bill Reimers for good implementation
suggestions.
Provide NO_LARGEFILE compile option to switch off largefile
support when compiling against versions of uclibc which
don't support it. Thanks to Stephane Billiart for the patch.
Implement random source ports for interactions with
upstream nameservers. New spoofing attacks have been found
against nameservers which do not do this, though it is not
clear if dnsmasq is vulnerable, since to doesn't implement
recursion. By default dnsmasq will now use a different
source port (and socket) for each query it sends
upstream. This behaviour can suppressed using the
--query-port option, and the old default behaviour
restored using --query-port=0. Explicit source-port
specifications in --server configs are still honoured.
Replace the random number generator, for better
security. On most BSD systems, dnsmasq uses the
arc4random() RNG, which is secure, but on other platforms,
it relied on the C-library RNG, which may be
guessable and therefore allow spoofing. This release
replaces the libc RNG with the SURF RNG, from Daniel
J. Berstein's DJBDNS package.
Don't attempt to change user or group or set capabilities
if dnsmasq is run as a non-root user. Without this, the
change from soft to hard errors when these fail causes
problems for non-root daemons listening on high
ports. Thanks to Patrick McLean for spotting this.
Updated French translation. Thanks to Gildas Le Nadan.
...@@ -387,12 +387,12 @@ A: This a variant on the iptables problem. Explicit details on how to ...@@ -387,12 +387,12 @@ A: This a variant on the iptables problem. Explicit details on how to
http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2007q4/001764.html http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2007q4/001764.html
Q: Dnsmasq logs "running as root because setting capabilities failed" Q: Dnsmasq fails to start up with a message about capabilities.
when it starts up. Why did that happen and what can do to fix it? Why did that happen and what can do to fix it?
A: Change your kernel configuration: either deselect CONFIG_SECURITY A: Change your kernel configuration: either deselect CONFIG_SECURITY
_or_ select CONFIG_SECURITY_CAPABILITIES. _or_ select CONFIG_SECURITY_CAPABILITIES. Alternatively, you can
remove the need to set capabilities by running dnsmasq as root.
Q: Where can I get .rpms Suitable for Suse? Q: Where can I get .rpms Suitable for Suse?
......
...@@ -74,7 +74,7 @@ install-i18n : all-i18n install-common ...@@ -74,7 +74,7 @@ install-i18n : all-i18n install-common
merge : merge :
$(MAKE) I18N=-DLOCALEDIR='\"$(LOCALEDIR)\"' -f ../bld/Makefile -C $(SRC) dnsmasq.pot $(MAKE) I18N=-DLOCALEDIR='\"$(LOCALEDIR)\"' -f ../bld/Makefile -C $(SRC) dnsmasq.pot
cd $(PO); for f in *.po; do \ cd $(PO); for f in *.po; do \
msgmerge -U $$f ../$(SRC)/dnsmasq.pot; \ msgmerge --no-wrap -U $$f ../$(SRC)/dnsmasq.pot; \
done done
...@@ -122,9 +122,18 @@ forwarder. Defaults to 1280, which is the RFC2671-recommended maximum ...@@ -122,9 +122,18 @@ forwarder. Defaults to 1280, which is the RFC2671-recommended maximum
for ethernet. for ethernet.
.TP .TP
.B \-Q, --query-port=<query_port> .B \-Q, --query-port=<query_port>
Send outbound DNS queries from, and listen for their replies on, the specific UDP port <query_port> instead of using one chosen at runtime. Useful to simplify your Send outbound DNS queries from, and listen for their replies on, the
firewall rules; without this, your firewall would have to allow connections from outside DNS servers to a range of UDP ports, or dynamically adapt to the specific UDP port <query_port> instead of using random ports. NOTE
port being used by the current dnsmasq instance. that using this option will make dnsmasq less secure against DNS
spoofing attacks but it may be faster and use less resources. Setting this option
to zero makes dnsmasq use a single port allocated to it by the
OS: this was the default behaviour in versions prior to 2.43.
.TP
.B --min-port=<port>
Do not use ports less than that given as source for outbound DNS
queries. Dnsmasq picks random ports as source for outbound queries:
when this option is given, the ports used will always to larger
than that specified. Useful for systems behind firewalls.
.TP .TP
.B \-i, --interface=<interface name> .B \-i, --interface=<interface name>
Listen only on the specified interface(s). Dnsmasq automatically adds Listen only on the specified interface(s). Dnsmasq automatically adds
...@@ -373,6 +382,9 @@ so any number may be included, split by commas. ...@@ -373,6 +382,9 @@ so any number may be included, split by commas.
.B --ptr-record=<name>[,<target>] .B --ptr-record=<name>[,<target>]
Return a PTR DNS record. Return a PTR DNS record.
.TP .TP
.B --naptr-record=<name>,<order>,<preference>,<flags>,<service>,<regexp>[,<replacement>]
Return an NAPTR DNS record, as specified in RFC3403.
.TP
.B --interface-name=<name>,<interface> .B --interface-name=<name>,<interface>
Return a DNS record associating the name with the primary address on Return a DNS record associating the name with the primary address on
the given interface. This flag specifies an A record for the given the given interface. This flag specifies an A record for the given
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -896,7 +896,7 @@ void dhcp_update_configs(struct dhcp_config *configs) ...@@ -896,7 +896,7 @@ void dhcp_update_configs(struct dhcp_config *configs)
crec = cache_find_by_name(crec, config->hostname, 0, F_IPV4); crec = cache_find_by_name(crec, config->hostname, 0, F_IPV4);
if (!crec) if (!crec)
continue; /* should be never */ continue; /* should be never */
my_syslog(LOG_WARNING, _("%s has more then one address in hostsfile, using %s for DHCP"), my_syslog(LOG_WARNING, _("%s has more than one address in hostsfile, using %s for DHCP"),
config->hostname, inet_ntoa(crec->addr.addr.addr.addr4)); config->hostname, inet_ntoa(crec->addr.addr.addr.addr4));
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -50,8 +50,10 @@ static struct log_entry *entries = NULL; ...@@ -50,8 +50,10 @@ static struct log_entry *entries = NULL;
static struct log_entry *free_entries = NULL; static struct log_entry *free_entries = NULL;
void log_start(struct passwd *ent_pw) int log_start(struct passwd *ent_pw, int errfd)
{ {
int ret = 0;
log_stderr = !!(daemon->options & OPT_DEBUG); log_stderr = !!(daemon->options & OPT_DEBUG);
if (daemon->log_fac != -1) if (daemon->log_fac != -1)
...@@ -70,8 +72,11 @@ void log_start(struct passwd *ent_pw) ...@@ -70,8 +72,11 @@ void log_start(struct passwd *ent_pw)
max_logs = daemon->max_logs; max_logs = daemon->max_logs;
if (!log_reopen(daemon->log_file)) if (!log_reopen(daemon->log_file))
die(_("cannot open %s: %s"), daemon->log_file ? daemon->log_file : "log", EC_FILE); {
send_event(errfd, EVENT_LOG_ERR, errno);
_exit(0);
}
/* if queuing is inhibited, make sure we allocate /* if queuing is inhibited, make sure we allocate
the one required buffer now. */ the one required buffer now. */
if (max_logs == 0) if (max_logs == 0)
...@@ -85,8 +90,11 @@ void log_start(struct passwd *ent_pw) ...@@ -85,8 +90,11 @@ void log_start(struct passwd *ent_pw)
change the ownership here so that the file is always owned by change the ownership here so that the file is always owned by
the dnsmasq user. Then logrotate can just copy the owner. the dnsmasq user. Then logrotate can just copy the owner.
Failure of the chown call is OK, (for instance when started as non-root) */ Failure of the chown call is OK, (for instance when started as non-root) */
if (log_to_file && ent_pw && ent_pw->pw_uid != 0 && fchown(log_fd, ent_pw->pw_uid, -1) != 0) if (log_to_file && ent_pw && ent_pw->pw_uid != 0 &&
my_syslog(LOG_WARNING, _("warning: failed to change owner of %s: %s"), daemon->log_file, strerror(errno)); fchown(log_fd, ent_pw->pw_uid, -1) != 0)
ret = errno;
return ret;
} }
int log_reopen(char *log_file) int log_reopen(char *log_file)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment