From 363fd6e2971358b86b6e35dd71d2e3154a20106a Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 28 Jul 2008 14:42:30 +0200 Subject: dssync keytab: add store enctypes in the libnet_keytype_entry structs. Still unused by the libnet_keytab_add() function. This will follow. In preparation of supporting multiple encryption types in libnet_dssync_keytab. Michael (This used to be commit 447b8b1122a35d4bc0ec0f88fb46d18cddcf6eb9) --- source3/libnet/libnet_dssync_keytab.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source3/libnet') diff --git a/source3/libnet/libnet_dssync_keytab.c b/source3/libnet/libnet_dssync_keytab.c index 350aa03320..cc53c983af 100644 --- a/source3/libnet/libnet_dssync_keytab.c +++ b/source3/libnet/libnet_dssync_keytab.c @@ -28,6 +28,7 @@ static NTSTATUS add_to_keytab_entries(TALLOC_CTX *mem_ctx, uint32_t kvno, const char *name, const char *prefix, + const krb5_enctype enctype, DATA_BLOB blob) { struct libnet_keytab_entry entry; @@ -38,6 +39,7 @@ static NTSTATUS add_to_keytab_entries(TALLOC_CTX *mem_ctx, prefix ? prefix : "", prefix ? "/" : "", name, ctx->dns_domain_name); + entry.enctype = enctype; entry.password = blob; NT_STATUS_HAVE_NO_MEMORY(entry.name); NT_STATUS_HAVE_NO_MEMORY(entry.principal); @@ -126,7 +128,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", blob); + ctx->nc_dn, "UTDV", + ENCTYPE_NULL, blob); if (!NT_STATUS_IS_OK(status)) { goto done; } @@ -250,6 +253,7 @@ static NTSTATUS parse_object(TALLOC_CTX *mem_ctx, DEBUGADD(1,("\n")); status = add_to_keytab_entries(mem_ctx, ctx, kvno, name, NULL, + ENCTYPE_ARCFOUR_HMAC, data_blob_talloc(mem_ctx, nt_passwd, 16)); if (!NT_STATUS_IS_OK(status)) { @@ -272,6 +276,7 @@ static NTSTATUS parse_object(TALLOC_CTX *mem_ctx, for (; i