[Freeipa-devel] [PATCH 0114] Log name of the zone if zone cannot be created
Adam Tkac
atkac at redhat.com
Mon Mar 4 14:00:23 UTC 2013
On Wed, Feb 20, 2013 at 04:57:13PM +0100, Petr Spacek wrote:
> Hello,
>
> Log name of the zone if zone cannot be created.
Ack
> From 9f97b85ada8d67f5422dedfb936bc75cb02dfa2c Mon Sep 17 00:00:00 2001
> From: Petr Spacek <pspacek at redhat.com>
> Date: Wed, 20 Feb 2013 16:55:30 +0100
> Subject: [PATCH] Log name of the zone if zone cannot be created.
>
> Signed-off-by: Petr Spacek <pspacek at redhat.com>
> ---
> src/ldap_helper.c | 17 +++++++++++------
> 1 file changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/src/ldap_helper.c b/src/ldap_helper.c
> index 71b96ce5eef2a249f7d16c448c70e2c2068d271d..19d9399ada3358c94b7d68f36b8e5147c4ae432d 100644
> --- a/src/ldap_helper.c
> +++ b/src/ldap_helper.c
> @@ -750,12 +750,17 @@ create_zone(ldap_instance_t *ldap_inst, dns_name_t *name, dns_zone_t **zonep)
> argv[1] = ldap_inst->db_name;
>
> result = dns_view_findzone(ldap_inst->view, name, &zone);
> - if (result == ISC_R_SUCCESS) {
> - result = ISC_R_EXISTS;
> - log_error_r("failed to create new zone");
> - goto cleanup;
> - } else if (result != ISC_R_NOTFOUND) {
> - log_error_r("dns_view_findzone() failed");
> + if (result != ISC_R_NOTFOUND) {
> + char zone_name[DNS_NAME_FORMATSIZE];
> + dns_name_format(name, zone_name, DNS_NAME_FORMATSIZE);
> +
> + if (result == ISC_R_SUCCESS) {
> + result = ISC_R_EXISTS;
> + log_error_r("failed to create new zone '%s'", zone_name);
> + } else {
> + log_error_r("dns_view_findzone() failed while "
> + "searching for zone '%s'", zone_name);
> + }
> goto cleanup;
> }
>
> --
> 1.7.11.7
>
--
Adam Tkac, Red Hat, Inc.
More information about the Freeipa-devel
mailing list