kerberos_pac: Fix code to work with MIT too
authorSimo Sorce <idra@samba.org>
Thu, 26 Apr 2012 16:41:25 +0000 (12:41 -0400)
committerSimo Sorce <idra@samba.org>
Thu, 26 Apr 2012 23:08:00 +0000 (19:08 -0400)
source4/auth/kerberos/kerberos_pac.c

index 1140fe4c6f0bac38df1f57934a5e313a29b28f9a..2ea04852bab11e2fdbddda4fcd30a6b51f82f68e 100644 (file)
@@ -377,7 +377,7 @@ krb5_error_code kerberos_pac_to_user_info_dc(TALLOC_CTX *mem_ctx,
        ndr_err = ndr_pull_union_blob(&pac_logon_info_in, tmp_ctx, &info,
                                      PAC_TYPE_LOGON_INFO,
                                      (ndr_pull_flags_fn_t)ndr_pull_PAC_INFO);
-       krb5_data_free(&k5pac_logon_info_in);
+       kerberos_free_data_contents(context, &k5pac_logon_info_in);
        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err) || !info.logon_info.info) {
                nt_status = ndr_map_error2ntstatus(ndr_err);
                DEBUG(0,("can't parse the PAC LOGON_INFO: %s\n", nt_errstr(nt_status)));
@@ -406,7 +406,7 @@ krb5_error_code kerberos_pac_to_user_info_dc(TALLOC_CTX *mem_ctx,
                ndr_err = ndr_pull_struct_blob(&pac_srv_checksum_in, pac_srv_sig,
                                               pac_srv_sig,
                                               (ndr_pull_flags_fn_t)ndr_pull_PAC_SIGNATURE_DATA);
-               krb5_data_free(&k5pac_srv_checksum_in);
+               kerberos_free_data_contents(context, &k5pac_srv_checksum_in);
                if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
                        nt_status = ndr_map_error2ntstatus(ndr_err);
                        DEBUG(0,("can't parse the KDC signature: %s\n",
@@ -427,7 +427,7 @@ krb5_error_code kerberos_pac_to_user_info_dc(TALLOC_CTX *mem_ctx,
                ndr_err = ndr_pull_struct_blob(&pac_kdc_checksum_in, pac_kdc_sig,
                                               pac_kdc_sig,
                                               (ndr_pull_flags_fn_t)ndr_pull_PAC_SIGNATURE_DATA);
-               krb5_data_free(&k5pac_kdc_checksum_in);
+               kerberos_free_data_contents(context, &k5pac_kdc_checksum_in);
                if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
                        nt_status = ndr_map_error2ntstatus(ndr_err);
                        DEBUG(0,("can't parse the KDC signature: %s\n",