diff options
author | Sumit Bose <sbose@redhat.com> | 2013-10-29 12:19:01 +0100 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2013-11-01 09:28:35 +0100 |
commit | d876a22732d83ddf8e37ead89e6f23bf7aa0d69c (patch) | |
tree | 42e30054f3c6586d063c23551f1a9217392f1264 /daemons/ipa-sam | |
parent | b5e60c20201d174cdf4df51a1443ab295cc086b9 (diff) | |
download | freeipa-d876a22732d83ddf8e37ead89e6f23bf7aa0d69c.tar.gz freeipa-d876a22732d83ddf8e37ead89e6f23bf7aa0d69c.tar.xz freeipa-d876a22732d83ddf8e37ead89e6f23bf7aa0d69c.zip |
Remove generation and handling of LM hashes
https://fedorahosted.org/freeipa/ticket/3795
Diffstat (limited to 'daemons/ipa-sam')
-rw-r--r-- | daemons/ipa-sam/ipa_sam.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/daemons/ipa-sam/ipa_sam.c b/daemons/ipa-sam/ipa_sam.c index 59ddcef2e..674085d2a 100644 --- a/daemons/ipa-sam/ipa_sam.c +++ b/daemons/ipa-sam/ipa_sam.c @@ -2637,10 +2637,9 @@ static bool init_sam_from_td(struct samu *user, struct pdb_trusted_domain *td, char *name; char *trustpw = NULL; char *trustpw_utf8 = NULL; - char *trustpw_utf8_uc = NULL; char *tmp_str = NULL; int ret; - struct ntlm_keys ntlm_keys; + uint8_t nt_key[16]; size_t converted_size; bool res; char *sid_str; @@ -2706,23 +2705,13 @@ static bool init_sam_from_td(struct samu *user, struct pdb_trusted_domain *td, goto done; } - if (!push_utf8_talloc(user, &trustpw_utf8_uc, tmp_str, &converted_size)) { - res = false; - goto done; - } - - ret = encode_ntlm_keys(trustpw_utf8, trustpw_utf8_uc, true, true, - &ntlm_keys); + ret = encode_nt_key(trustpw_utf8, nt_key); if (ret != 0) { res = false; goto done; } - if (!pdb_set_lanman_passwd(user, ntlm_keys.lm, PDB_SET)) { - res = false; - goto done; - } - if (!pdb_set_nt_passwd(user, ntlm_keys.nt, PDB_SET)) { + if (!pdb_set_nt_passwd(user, nt_key, PDB_SET)) { res = false; goto done; } @@ -2741,10 +2730,6 @@ done: memset(tmp_str, 0, strlen(tmp_str)); talloc_free(tmp_str); } - if (trustpw_utf8_uc != NULL) { - memset(trustpw_utf8_uc, 0, strlen(trustpw_utf8_uc)); - talloc_free(trustpw_utf8_uc); - } return res; } |