s4-kdc: Use smb_krb5_mk_error() in kpasswd implementation
authorAndreas Schneider <asn@samba.org>
Tue, 14 Jun 2016 14:31:32 +0000 (16:31 +0200)
committerJeremy Allison <jra@samba.org>
Sat, 18 Jun 2016 21:32:26 +0000 (23:32 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/kdc/kpasswd-heimdal.c

index 20e718b43d6c8eef232aa541279f69621686aeb8..453e41a41bd58f2e0c07934118a59753519eb785 100644 (file)
@@ -76,14 +76,17 @@ static bool kpasswdd_make_unauth_error_reply(struct kdc_server *kdc,
        }
        k5_error_bytes.data = error_bytes.data;
        k5_error_bytes.length = error_bytes.length;
-       kret = krb5_mk_error(kdc->smb_krb5_context->krb5_context,
-                            result_code, NULL, &k5_error_bytes,
-                            NULL, NULL, NULL, NULL, &k5_error_blob);
+       kret = smb_krb5_mk_error(kdc->smb_krb5_context->krb5_context,
+                                result_code,
+                                NULL,
+                                &k5_error_bytes,
+                                &k5_error_blob);
        if (kret) {
                return false;
        }
        *error_blob = data_blob_talloc(mem_ctx, k5_error_blob.data, k5_error_blob.length);
-       krb5_data_free(&k5_error_blob);
+       kerberos_free_data_contents(kdc->smb_krb5_context->krb5_context,
+                                   &k5_error_blob);
        if (!error_blob->data) {
                return false;
        }