From 5274beba4cf722a34403dc07bf287815a6df6281 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 25 Oct 2017 19:50:57 +0200 Subject: [PATCH] s3:passdb: Make sure the salt is fully initialized before passing Otherwise the magic member is not initialized. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13101 Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison --- source3/passdb/machine_account_secrets.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source3/passdb/machine_account_secrets.c b/source3/passdb/machine_account_secrets.c index fbc87c5619c..75f31cb04e2 100644 --- a/source3/passdb/machine_account_secrets.c +++ b/source3/passdb/machine_account_secrets.c @@ -1090,8 +1090,10 @@ static int secrets_domain_info_kerberos_keys(struct secrets_domain_info1_passwor return krb5_ret; } - salt.data = discard_const(salt_data); - salt.length = strlen(salt_data); + salt = (krb5_data) { + .data = discard_const(salt_data), + .length = strlen(salt_data), + }; ok = convert_string_talloc(keys, CH_UTF16MUNGED, CH_UTF8, p->cleartext_blob.data,