diff options
author | Günther Deschner <gd@samba.org> | 2010-08-31 11:00:03 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-08-31 23:17:39 +0200 |
commit | 9986d25ed195ee77bd73c96f057c527b4c3a8f03 (patch) | |
tree | 17e653178744a448079f06158594e6e4bdb0895a | |
parent | 3d78279fd437a5ef5b4ed7ff88c1f605cd0999d9 (diff) | |
download | samba-9986d25ed195ee77bd73c96f057c527b4c3a8f03.tar.gz samba-9986d25ed195ee77bd73c96f057c527b4c3a8f03.tar.bz2 samba-9986d25ed195ee77bd73c96f057c527b4c3a8f03.zip |
s3-kerberos: use krb5 compat macros in fill_keytab_from_password().
Guenther
-rw-r--r-- | source3/librpc/rpc/dcerpc_krb5.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/source3/librpc/rpc/dcerpc_krb5.c b/source3/librpc/rpc/dcerpc_krb5.c index ede4f6b597..dc1cec8370 100644 --- a/source3/librpc/rpc/dcerpc_krb5.c +++ b/source3/librpc/rpc/dcerpc_krb5.c @@ -128,10 +128,7 @@ static krb5_error_code fill_keytab_from_password(krb5_context krbctx, for (i = 0; enctypes[i]; i++) { krb5_keyblock *key = NULL; - if (!(key = SMB_MALLOC_P(krb5_keyblock))) { - ret = ENOMEM; - goto out; - } + key = KRB5_KT_KEY(&kt_entry); if (create_kerberos_key_from_string(krbctx, princ, password, key, @@ -139,13 +136,11 @@ static krb5_error_code fill_keytab_from_password(krb5_context krbctx, DEBUG(10, ("Failed to create key for enctype %d " "(error: %s)\n", enctypes[i], error_message(ret))); - SAFE_FREE(key); continue; } kt_entry.principal = princ; kt_entry.vno = vno; - kt_entry.key = *key; ret = krb5_kt_add_entry(krbctx, keytab, &kt_entry); if (ret) { |