]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libnet keytab: use libnet_keytab_add_entry() in libnet_keytab_add().
authorMichael Adam <obnox@samba.org>
Tue, 29 Jul 2008 13:21:30 +0000 (15:21 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 1 Aug 2008 14:04:43 +0000 (16:04 +0200)
This will in particular allow us to store ENCTYPE_NULL.

Michael

source/libnet/libnet_keytab.c

index 0b8327c38fa571640e7c5c3dacfdd7300872aba4..6fe718bb81046927e2595c0ee8f359e67b1c136e 100644 (file)
@@ -161,9 +161,7 @@ done:
 
 krb5_error_code libnet_keytab_add(struct libnet_keytab_context *ctx)
 {
-#if defined(ENCTYPE_ARCFOUR_HMAC)
        krb5_error_code ret = 0;
-       krb5_enctype enctypes[2] = { ENCTYPE_ARCFOUR_HMAC, 0 };
        int i;
 
        for (i=0; i<ctx->count; i++) {
@@ -174,14 +172,12 @@ krb5_error_code libnet_keytab_add(struct libnet_keytab_context *ctx)
                password.data = (char *)entry->password.data;
                password.length = entry->password.length;
 
-               ret = smb_krb5_kt_add_entry_ext(ctx->context,
-                                               ctx->keytab,
-                                               entry->kvno,
-                                               entry->principal,
-                                               enctypes,
-                                               password,
-                                               true,
-                                               true);
+               ret = libnet_keytab_add_entry(ctx->context,
+                                             ctx->keytab,
+                                             entry->kvno,
+                                             entry->principal,
+                                             entry->enctype,
+                                             password);
                if (ret) {
                        DEBUG(1,("libnet_keytab_add: "
                                "Failed to add entry to keytab file\n"));
@@ -190,9 +186,6 @@ krb5_error_code libnet_keytab_add(struct libnet_keytab_context *ctx)
        }
 
        return ret;
-#else
-       return -1;
-#endif /* defined(ENCTYPE_ARCFOUR_HMAC) */
 }
 
 struct libnet_keytab_entry *libnet_keytab_search(struct libnet_keytab_context *ctx,