From: Michael Adam Date: Tue, 29 Jul 2008 13:21:30 +0000 (+0200) Subject: libnet keytab: use libnet_keytab_add_entry() in libnet_keytab_add(). X-Git-Tag: samba-3.3.0pre1~316 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=85c7e3ae29a6f25ed0b6917ff73baea9c6c905c6;p=thirdparty%2Fsamba.git libnet keytab: use libnet_keytab_add_entry() in libnet_keytab_add(). This will in particular allow us to store ENCTYPE_NULL. Michael --- diff --git a/source/libnet/libnet_keytab.c b/source/libnet/libnet_keytab.c index 0b8327c38fa..6fe718bb810 100644 --- a/source/libnet/libnet_keytab.c +++ b/source/libnet/libnet_keytab.c @@ -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; icount; 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,