[syslog-ng] [PATCH] [cfg] make dns_cache_hosts default to /etc/hosts
Balint Kovacs
balint.kovacs at balabit.com
Sat Aug 25 12:21:21 CEST 2012
On 08/24/2012 02:43 PM, balint.kovacs at balabit.com wrote:
> From: Balint Kovacs <balint.kovacs at balabit.com>
>
> The default for dns_cache_hosts was empty until now,
> which resulted in use_dns(persist_only) not to work
> out-of-the box until the user set the dns_cache_hosts
> to a sane value. This should make the configuration
> more intuitive in most use-cases.
>
> Signed-off-by: Balint Kovacs <blint at balabit.hu>
> ---
> lib/cfg.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/lib/cfg.c b/lib/cfg.c
> index ed4cedf..8ba22df 100644
> --- a/lib/cfg.c
> +++ b/lib/cfg.c
> @@ -315,6 +315,7 @@ cfg_new(gint version)
> self->dns_cache_size = 1007;
> self->dns_cache_expire = 3600;
> self->dns_cache_expire_failed = 60;
> + self->dns_cache_hosts = "/etc/hosts";
> self->threaded = FALSE;
>
> log_template_options_defaults(&self->template_options);
Argh, and of course this would cause a segfault on syslog-ng shutdown when trying to free it, so the right thing would be
self->dns_cache_hosts = g_strdup("/etc/hosts");
More information about the syslog-ng
mailing list