summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-07-28 14:42:30 +0200
committerMichael Adam <obnox@samba.org>2008-08-01 16:04:41 +0200
commit363fd6e2971358b86b6e35dd71d2e3154a20106a (patch)
tree2b4cccfbcce06d3938712882bdf402a07ff5efa5 /source3
parentf97ba38c3f2d85294eea67b12b9d7601e4f00803 (diff)
downloadsamba-363fd6e2971358b86b6e35dd71d2e3154a20106a.tar.gz
samba-363fd6e2971358b86b6e35dd71d2e3154a20106a.tar.bz2
samba-363fd6e2971358b86b6e35dd71d2e3154a20106a.zip
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)
Diffstat (limited to 'source3')
-rw-r--r--source3/libnet/libnet_dssync_keytab.c7
1 files changed, 6 insertions, 1 deletions
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<pwd_history_len; i++) {
status = add_to_keytab_entries(mem_ctx, ctx, kvno--, name, NULL,
+ ENCTYPE_ARCFOUR_HMAC,
data_blob_talloc(mem_ctx, &pwd_history[i*16], 16));
if (!NT_STATUS_IS_OK(status)) {
break;