libnet keytab: add enctype parameter to libnet_keytab_search().
authorMichael Adam <obnox@samba.org>
Tue, 29 Jul 2008 08:16:37 +0000 (10:16 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 1 Aug 2008 14:04:42 +0000 (16:04 +0200)
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
(This used to be commit cb91d07413430e0e0a16846d2c44aae8c165400e)

source3/libnet/libnet_dssync_keytab.c
source3/libnet/libnet_keytab.c
source3/libnet/libnet_proto.h

index cc53c983afdca110e219c739f0570978985f97ad..526bb736471eb6b7c17ae347f4890deb0c07124d 100644 (file)
@@ -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;
                }
index cec39273e3b2323545a78a7e7940625932a2776b..e51cd055729d67de3410896cb8b3d3be6f54fd18 100644 (file)
@@ -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;
index 65d37b0ab88ac82ac488c795c17b937d2cc2e897..43046a44c0cd2903cc45690f26d6b489d675d5a4 100644 (file)
@@ -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