From cb91d07413430e0e0a16846d2c44aae8c165400e Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 29 Jul 2008 10:16:37 +0200 Subject: [PATCH] libnet keytab: add enctype parameter to libnet_keytab_search(). Not really used yet. Note: callers use ENCTYPE_ARCFOUR_HMAC enctype for UTDV (for now). This is what is currently stored. This is to be changed to ENCTYPE_NULL. Michael --- source/libnet/libnet_dssync_keytab.c | 6 ++++-- source/libnet/libnet_keytab.c | 1 + source/libnet/libnet_proto.h | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/source/libnet/libnet_dssync_keytab.c b/source/libnet/libnet_dssync_keytab.c index cc53c983afd..526bb736471 100644 --- a/source/libnet/libnet_dssync_keytab.c +++ b/source/libnet/libnet_dssync_keytab.c @@ -73,7 +73,8 @@ static NTSTATUS keytab_startup(struct dssync_context *ctx, TALLOC_CTX *mem_ctx, ctx->nc_dn, ctx->dns_domain_name); NT_STATUS_HAVE_NO_MEMORY(principal); - entry = libnet_keytab_search(keytab_ctx, principal, 0, mem_ctx); + entry = libnet_keytab_search(keytab_ctx, principal, 0, ENCTYPE_ARCFOUR_HMAC, + mem_ctx); if (entry) { enum ndr_err_code ndr_err; old_utdv = talloc(mem_ctx, struct replUpToDateVectorBlob); @@ -129,7 +130,8 @@ static NTSTATUS keytab_finish(struct dssync_context *ctx, TALLOC_CTX *mem_ctx, status = add_to_keytab_entries(mem_ctx, keytab_ctx, 0, ctx->nc_dn, "UTDV", - ENCTYPE_NULL, blob); + ENCTYPE_ARCFOUR_HMAC, + blob); if (!NT_STATUS_IS_OK(status)) { goto done; } diff --git a/source/libnet/libnet_keytab.c b/source/libnet/libnet_keytab.c index cec39273e3b..e51cd055729 100644 --- a/source/libnet/libnet_keytab.c +++ b/source/libnet/libnet_keytab.c @@ -143,6 +143,7 @@ krb5_error_code libnet_keytab_add(struct libnet_keytab_context *ctx) struct libnet_keytab_entry *libnet_keytab_search(struct libnet_keytab_context *ctx, const char *principal, int kvno, + const krb5_enctype enctype, TALLOC_CTX *mem_ctx) { krb5_error_code ret = 0; diff --git a/source/libnet/libnet_proto.h b/source/libnet/libnet_proto.h index 65d37b0ab88..43046a44c0c 100644 --- a/source/libnet/libnet_proto.h +++ b/source/libnet/libnet_proto.h @@ -53,6 +53,7 @@ krb5_error_code libnet_keytab_add(struct libnet_keytab_context *ctx); struct libnet_keytab_entry *libnet_keytab_search(struct libnet_keytab_context *ctx, const char *principal, int kvno, + const const krb5_enctype enctype, TALLOC_CTX *mem_ctx); #endif -- 2.11.4.GIT