summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-12-20 00:27:34 +0100
committerVolker Lendecke <vl@samba.org>2010-01-03 11:38:22 +0100
commit41a5149981eb7293a54f0497c3a4f4fc50661157 (patch)
tree08ab7c003e34f801497ce9b1a9c3076e022e95df
parente2f361d05e4ccef71397dd52cf78c6d36bea628e (diff)
downloadsamba-41a5149981eb7293a54f0497c3a4f4fc50661157.tar.gz
samba-41a5149981eb7293a54f0497c3a4f4fc50661157.tar.bz2
samba-41a5149981eb7293a54f0497c3a4f4fc50661157.zip
s3: Slightly simplify winbindd_dual_ccache_ntlm_auth
data_blob_const can't fail
-rw-r--r--source3/winbindd/winbindd_ccache_access.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/source3/winbindd/winbindd_ccache_access.c b/source3/winbindd/winbindd_ccache_access.c
index f8f9ddfad5..921110a0be 100644
--- a/source3/winbindd/winbindd_ccache_access.c
+++ b/source3/winbindd/winbindd_ccache_access.c
@@ -251,21 +251,15 @@ enum winbindd_result winbindd_dual_ccache_ntlm_auth(struct winbindd_domain *doma
goto process_result;
}
- initial = data_blob(state->request->extra_data.data, initial_blob_len);
- challenge = data_blob(state->request->extra_data.data + initial_blob_len,
- state->request->data.ccache_ntlm_auth.challenge_blob_len);
-
- if (!initial.data || !challenge.data) {
- result = NT_STATUS_NO_MEMORY;
- } else {
- result = do_ntlm_auth_with_hashes(name_user, name_domain,
- entry->lm_hash, entry->nt_hash,
- initial, challenge, &auth);
- }
-
- data_blob_free(&initial);
- data_blob_free(&challenge);
-
+ initial = data_blob_const(state->request->extra_data.data,
+ initial_blob_len);
+ challenge = data_blob_const(
+ state->request->extra_data.data + initial_blob_len,
+ state->request->data.ccache_ntlm_auth.challenge_blob_len);
+
+ result = do_ntlm_auth_with_hashes(name_user, name_domain,
+ entry->lm_hash, entry->nt_hash,
+ initial, challenge, &auth);
if (!NT_STATUS_IS_OK(result)) {
goto process_result;
}