s4 dns: Make debug output less noisy
authorKai Blin <kai@samba.org>
Thu, 6 Sep 2012 20:53:32 +0000 (22:53 +0200)
committerKai Blin <kai@samba.org>
Thu, 6 Sep 2012 22:31:56 +0000 (00:31 +0200)
Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Fri Sep  7 00:31:56 CEST 2012 on sn-devel-104

source4/dns_server/dns_crypto.c
source4/dns_server/dns_query.c
source4/dns_server/dns_server.c
source4/dns_server/dns_update.c

index 7362adc426b4338f23147802a4a03fd92689eb32..7604a053392831c1d99370188721a09f40e4b02a 100644 (file)
@@ -121,7 +121,7 @@ WERROR dns_verify_tsig(struct dns_server *dns,
 
        /* The TSIG record needs to be the last additional record */
        if (found_tsig && i + 1 != packet->arcount) {
-               DEBUG(0, ("TSIG record not the last additional record!\n"));
+               DEBUG(1, ("TSIG record not the last additional record!\n"));
                return DNS_ERR(FORMAT_ERROR);
        }
 
@@ -218,7 +218,7 @@ WERROR dns_verify_tsig(struct dns_server *dns,
        }
 
        if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(0, ("Verifying tsig failed: %s\n", nt_errstr(status)));
+               DEBUG(1, ("Verifying tsig failed: %s\n", nt_errstr(status)));
                return ntstatus_to_werror(status);
        }
 
index 98ebc63d97f13be73674f62a84a79b9a59e21dea..54e0c7f3b0c4119f12490edb56396af71063b92c 100644 (file)
@@ -509,7 +509,7 @@ static WERROR handle_tkey(struct dns_server *dns,
                                return WERR_NOMEM;
                        }
                } else {
-                       DEBUG(0, ("GSS key negotiation returned %s\n", nt_errstr(status)));
+                       DEBUG(1, ("GSS key negotiation returned %s\n", nt_errstr(status)));
                        ret_tkey->rdata.tkey_record.error = DNS_RCODE_BADKEY;
                }
 
index d9851b1566927f382675507025b0a5b8debaf557..be1fecc008cda6e2338797a60886ab428baeb3bb 100644 (file)
@@ -147,7 +147,7 @@ static struct tevent_req *dns_process_send(TALLOC_CTX *mem_ctx,
 
        ret = dns_verify_tsig(dns, state, &state->state, &state->in_packet, in);
        if (!W_ERROR_IS_OK(ret)) {
-               DEBUG(0, ("Bailing out early!\n"));
+               DEBUG(1, ("Failed to verify TSIG!\n"));
                state->dns_err = werr_to_dns_err(ret);
                tevent_req_done(req);
                return tevent_req_post(req, ev);
index 5eca0a4c2776859b25ffc5c1175daea54f0955a2..2df0b580e49a5ad4ffa0cf0c1012985e14f436e8 100644 (file)
@@ -436,10 +436,10 @@ static WERROR handle_one_update(struct dns_server *dns,
                                                  tkey->session_info->security_token,
                                                  access_mask, NULL);
                if (ldb_ret != LDB_SUCCESS) {
-                       DEBUG(0, ("Disallowing update: %s\n", ldb_strerror(ldb_ret)));
+                       DEBUG(5, ("Disallowing update: %s\n", ldb_strerror(ldb_ret)));
                        return DNS_ERR(REFUSED);
                }
-               DEBUG(0, ("Allowing signed update\n"));
+               DEBUG(5, ("Allowing signed update\n"));
        }
 
        if (update->rr_class == zone->question_class) {
@@ -450,7 +450,7 @@ static WERROR handle_one_update(struct dns_server *dns,
                         */
                        for (i = 0; i < rcount; i++) {
                                if (recs[i].wType != DNS_TYPE_CNAME) {
-                                       DEBUG(0, ("Skipping update\n"));
+                                       DEBUG(5, ("Skipping update\n"));
                                        return WERR_OK;
                                }
                                break;
@@ -481,7 +481,7 @@ static WERROR handle_one_update(struct dns_server *dns,
                         */
                        for (i = 0; i < rcount; i++) {
                                if (recs[i].wType == DNS_TYPE_CNAME) {
-                                       DEBUG(0, ("Skipping update\n"));
+                                       DEBUG(5, ("Skipping update\n"));
                                        return WERR_OK;
                                }
                        }
@@ -505,7 +505,7 @@ static WERROR handle_one_update(struct dns_server *dns,
                                         * logic for RFC2136
                                         */
                                        if (n <= o) {
-                                               DEBUG(0, ("Skipping update\n"));
+                                               DEBUG(5, ("Skipping update\n"));
                                                return WERR_OK;
                                        }
                                        found = true;
@@ -513,7 +513,7 @@ static WERROR handle_one_update(struct dns_server *dns,
                                }
                        }
                        if (!found) {
-                               DEBUG(0, ("Skipping update\n"));
+                               DEBUG(5, ("Skipping update\n"));
                                return WERR_OK;
                        }
 
@@ -675,7 +675,7 @@ static WERROR handle_updates(struct dns_server *dns,
        werror = check_prerequisites(dns, tmp_ctx, zone, prereqs, pcount);
        W_ERROR_NOT_OK_GOTO(werror, failed);
 
-       DEBUG(0, ("update count is %u\n", upd_count));
+       DEBUG(1, ("update count is %u\n", upd_count));
 
        for (ri = 0; ri < upd_count; ri++) {
                werror = handle_one_update(dns, tmp_ctx, zone,
@@ -699,17 +699,17 @@ static WERROR dns_update_allowed(struct dns_server *dns,
                                 struct dns_server_tkey **tkey)
 {
        if (lpcfg_allow_dns_updates(dns->task->lp_ctx) == DNS_UPDATE_ON) {
-               DEBUG(0, ("All updates allowed.\n"));
+               DEBUG(2, ("All updates allowed.\n"));
                return WERR_OK;
        }
 
        if (lpcfg_allow_dns_updates(dns->task->lp_ctx) == DNS_UPDATE_OFF) {
-               DEBUG(0, ("Updates disabled.\n"));
+               DEBUG(2, ("Updates disabled.\n"));
                return DNS_ERR(REFUSED);
        }
 
        if (state->authenticated == false ) {
-               DEBUG(0, ("Update not allowed for unsigned packet.\n"));
+               DEBUG(2, ("Update not allowed for unsigned packet.\n"));
                return DNS_ERR(REFUSED);
        }
 
@@ -764,13 +764,13 @@ WERROR dns_server_process_update(struct dns_server *dns,
        }
 
        if (z == NULL) {
-               DEBUG(0, ("We're not authoritative for this zone\n"));
+               DEBUG(1, ("We're not authoritative for this zone\n"));
                return DNS_ERR(NOTAUTH);
        }
 
        if (host_part_len != 0) {
                /* TODO: We need to delegate this one */
-               DEBUG(0, ("Would have to delegate zones.\n"));
+               DEBUG(1, ("Would have to delegate zones.\n"));
                return DNS_ERR(NOT_IMPLEMENTED);
        }