From c761654b925d2cb556768bcd121ad9bf8f0c3bf9 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 30 Mar 2012 15:25:59 +0200 Subject: s4-ldb: use KRB5_KEY macros to access key elements. Guenther Signed-off-by: Andreas Schneider --- source4/dsdb/samdb/ldb_modules/password_hash.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source4/dsdb/samdb/ldb_modules') diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c index 553cd686a4..c22a0b2713 100644 --- a/source4/dsdb/samdb/ldb_modules/password_hash.c +++ b/source4/dsdb/samdb/ldb_modules/password_hash.c @@ -760,8 +760,8 @@ static int setup_kerberos_keys(struct setup_password_fields_io *io) return LDB_ERR_OPERATIONS_ERROR; } io->g.aes_256 = data_blob_talloc(io->ac, - key.keyvalue.data, - key.keyvalue.length); + KRB5_KEY_DATA(&key), + KRB5_KEY_LENGTH(&key)); krb5_free_keyblock_contents(io->smb_krb5_context->krb5_context, &key); if (!io->g.aes_256.data) { return ldb_oom(ldb); @@ -785,8 +785,8 @@ static int setup_kerberos_keys(struct setup_password_fields_io *io) return LDB_ERR_OPERATIONS_ERROR; } io->g.aes_128 = data_blob_talloc(io->ac, - key.keyvalue.data, - key.keyvalue.length); + KRB5_KEY_DATA(&key), + KRB5_KEY_LENGTH(&key)); krb5_free_keyblock_contents(io->smb_krb5_context->krb5_context, &key); if (!io->g.aes_128.data) { return ldb_oom(ldb); @@ -810,8 +810,8 @@ static int setup_kerberos_keys(struct setup_password_fields_io *io) return LDB_ERR_OPERATIONS_ERROR; } io->g.des_md5 = data_blob_talloc(io->ac, - key.keyvalue.data, - key.keyvalue.length); + KRB5_KEY_DATA(&key), + KRB5_KEY_LENGTH(&key)); krb5_free_keyblock_contents(io->smb_krb5_context->krb5_context, &key); if (!io->g.des_md5.data) { return ldb_oom(ldb); @@ -835,8 +835,8 @@ static int setup_kerberos_keys(struct setup_password_fields_io *io) return LDB_ERR_OPERATIONS_ERROR; } io->g.des_crc = data_blob_talloc(io->ac, - key.keyvalue.data, - key.keyvalue.length); + KRB5_KEY_DATA(&key), + KRB5_KEY_LENGTH(&key)); krb5_free_keyblock_contents(io->smb_krb5_context->krb5_context, &key); if (!io->g.des_crc.data) { return ldb_oom(ldb); -- cgit