summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2012-03-30 15:25:59 +0200
committerAndreas Schneider <asn@samba.org>2012-04-12 12:06:41 +0200
commitc761654b925d2cb556768bcd121ad9bf8f0c3bf9 (patch)
tree48bfd8e863869fc04ec1fc6a3981a6920bd9a7d2 /source4/dsdb/samdb/ldb_modules
parent011540b5209f9f86cf683d625daf35e9f6744118 (diff)
downloadsamba-c761654b925d2cb556768bcd121ad9bf8f0c3bf9.tar.gz
samba-c761654b925d2cb556768bcd121ad9bf8f0c3bf9.tar.bz2
samba-c761654b925d2cb556768bcd121ad9bf8f0c3bf9.zip
s4-ldb: use KRB5_KEY macros to access key elements.
Guenther Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r--source4/dsdb/samdb/ldb_modules/password_hash.c16
1 files changed, 8 insertions, 8 deletions
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);