Revert "more debug"
authorStefan Metzmacher <metze@samba.org>
Sat, 20 Jul 2019 11:19:35 +0000 (11:19 +0000)
committerStefan Metzmacher <metze@samba.org>
Tue, 29 Oct 2019 13:38:47 +0000 (14:38 +0100)
This reverts commit 0f1312c76bd0ba5b463c6e97e1e6a94953b8882d.

source3/librpc/crypto/gse.c
source4/heimdal/lib/krb5/keytab.c
source4/heimdal/lib/krb5/rd_req.c

index 5df4de3287d2d21df2d879ef20c0c11bc8be9bcd..3db70796d094a1861cb0f1c6275af59f4fe4c89f 100644 (file)
@@ -723,12 +723,7 @@ static char *gse_errstr(TALLOC_CTX *mem_ctx, OM_uint32 maj, OM_uint32 min)
        if (gss_maj) {
                goto done;
        }
-       errstr = talloc_asprintf(mem_ctx, "maj[%d] min[%d]: ",
-                                (int)maj, (int)gss_min);
-       if (!errstr) {
-               goto done;
-       }
-       errstr = talloc_strndup_append_buffer(errstr,
+       errstr = talloc_strndup(mem_ctx,
                                (char *)msg_maj.value,
                                        msg_maj.length);
        if (!errstr) {
index 834a1607d46ee8e7c8bfcc3b4cd3a1929ef54269..8ca515f2133d18400b3691c64767b5c451c694ae 100644 (file)
@@ -651,8 +651,6 @@ krb5_kt_get_entry(krb5_context context,
     if (entry->vno == 0)
        return _krb5_kt_principal_not_found(context, KRB5_KT_NOTFOUND,
                                            id, principal, enctype, kvno);
-//    return _krb5_kt_principal_not_found(context, EINVAL,
-//                                         id, principal, enctype, kvno);
     return 0;
 }
 
index d4d508e33b1057850b53653319c9dbfcd97b47cf..4ea3cee959dce80166cc1926ab7989e5ed896a0e 100644 (file)
@@ -963,14 +963,12 @@ krb5_rd_req_ctx(krb5_context context,
            server = service;
        }
 
-    dprintf(2, "krb5_rd_req_ctx:%d: HERE\n", __LINE__);
        ret = get_key_from_keytab(context,
                                  &ap_req,
                                  server,
                                  id,
                                  &o->keyblock);
        if (ret) {
-    dprintf(2, "krb5_rd_req_ctx:%d: HERE\n", __LINE__);
            /* If caller specified a server, fail. */
            if (service == NULL && (context->flags & KRB5_CTX_F_RD_REQ_IGNORE) == 0)
                goto out;
@@ -986,7 +984,6 @@ krb5_rd_req_ctx(krb5_context context,
         * We got an exact keymatch, use that.
         */
 
-    dprintf(2, "krb5_rd_req_ctx:%d: TRY keyblock\n", __LINE__);
        ret = krb5_verify_ap_req2(context,
                                  auth_context,
                                  &ap_req,
@@ -997,11 +994,8 @@ krb5_rd_req_ctx(krb5_context context,
                                  &o->ticket,
                                  KRB5_KU_AP_REQ_AUTH);
 
-       if (ret) {
-    dprintf(2, "krb5_rd_req_ctx:%d: FAIL keyblock: %d\n", __LINE__, ret);
+       if (ret)
            goto out;
-        }
-    dprintf(2, "krb5_rd_req_ctx:%d: OK keyblock\n", __LINE__);
 
     } else {
        /*
@@ -1021,14 +1015,12 @@ krb5_rd_req_ctx(krb5_context context,
        if (ret)
            goto out;
 
-    dprintf(2, "krb5_rd_req_ctx:%d: START LOOP\n", __LINE__);
        done = 0;
        while (!done) {
            krb5_principal p;
 
            ret = krb5_kt_next_entry(context, id, &entry, &cursor);
            if (ret) {
-    dprintf(2, "krb5_rd_req_ctx:%d: NOT FOUND\n", __LINE__);
                _krb5_kt_principal_not_found(context, ret, id, o->server,
                                             ap_req.ticket.enc_part.etype,
                                             kvno);
@@ -1036,12 +1028,10 @@ krb5_rd_req_ctx(krb5_context context,
            }
 
            if (entry.keyblock.keytype != ap_req.ticket.enc_part.etype) {
-    dprintf(2, "krb5_rd_req_ctx:%d: SKIP\n", __LINE__);
                krb5_kt_free_entry (context, &entry);
                continue;
            }
 
-    dprintf(2, "krb5_rd_req_ctx:%d: TRY\n", __LINE__);
            ret = krb5_verify_ap_req2(context,
                                      auth_context,
                                      &ap_req,
@@ -1053,16 +1043,13 @@ krb5_rd_req_ctx(krb5_context context,
                                      KRB5_KU_AP_REQ_AUTH);
            if (ret == KRB5KRB_AP_ERR_BAD_INTEGRITY) {
                /* failed to decrypt, try the next key */
-    dprintf(2, "krb5_rd_req_ctx:%d: FAIL %d => SKIP\n", __LINE__, ret);
                krb5_kt_free_entry (context, &entry);
                continue;
            }
            if (ret) {
-    dprintf(2, "krb5_rd_req_ctx:%d: FAIL %d\n", __LINE__, ret);
                krb5_kt_free_entry (context, &entry);
                goto out;
            }
-    dprintf(2, "krb5_rd_req_ctx:%d: OK\n", __LINE__);
 
            /*
             * Found a match, save the keyblock for PAC processing,