summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-03-13 11:12:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:57:11 -0500
commit54b33de0fc93bc068fcd04ac12eb2e71b14eefa7 (patch)
tree1cce662d471d57c168204975d30bd09e206c57f6 /source4
parent18a050b8708ff57552e0f9523a941521ad0f8e7b (diff)
downloadsamba-54b33de0fc93bc068fcd04ac12eb2e71b14eefa7.tar.gz
samba-54b33de0fc93bc068fcd04ac12eb2e71b14eefa7.tar.bz2
samba-54b33de0fc93bc068fcd04ac12eb2e71b14eefa7.zip
r14312: Formatting and comments.
Andrew Bartlett (This used to be commit 1905a27c78165972aaa78b72a199ee9230fbf73d)
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/samdb/ldb_modules/password_hash.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
index 6980fe48b8..bdbbafd955 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -376,6 +376,7 @@ static int password_hash_handle(struct ldb_module *module, struct ldb_request *r
* or replace with a new one). Both the unicode and NT hash
* only branches append keys to this multivalued entry. */
CHECK_RET(ldb_msg_add_empty(modify_msg, "krb5Key", LDB_FLAG_MOD_REPLACE));
+
/* Yay, we can compute new password hashes from the unicode
* password */
if (sambaPassword) {
@@ -467,7 +468,7 @@ static int password_hash_handle(struct ldb_module *module, struct ldb_request *r
/* TODO: We may wish to control the encryption types chosen in future */
krb5_ret = hdb_generate_key_set_password(smb_krb5_context->krb5_context,
- salt_principal, sambaPassword, &keys, &num_keys);
+ salt_principal, sambaPassword, &keys, &num_keys);
krb5_free_principal(smb_krb5_context->krb5_context, salt_principal);
if (krb5_ret) {
@@ -480,7 +481,8 @@ static int password_hash_handle(struct ldb_module *module, struct ldb_request *r
return LDB_ERR_OPERATIONS_ERROR;
}
- /* Walking
+ /* Walking all the key types generated, transform each
+ * key into an ASN.1 blob
*/
for (i=0; i < num_keys; i++) {
unsigned char *buf;
@@ -651,8 +653,8 @@ static int password_hash_handle(struct ldb_module *module, struct ldb_request *r
}
sambaLMPwdHistory_len = MIN(sambaLMPwdHistory_len + 1, pwdHistoryLength);
- /* Likewise, we might not have a new NT password (lm
- * only password change function) */
+ /* Likewise, we might not have an old NT password (lm
+ * only password change function on previous change) */
if (ntOldHash) {
new_sambaNTPwdHistory[0] = *ntOldHash;
} else {