summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-08-03 09:33:29 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-08-03 12:45:04 +0200
commitfec25c3a627bfbb14cf0aaf8773f54e0e5017517 (patch)
treec49e380c6ecfb3410133119e60c3ba702fbb2286 /source4
parentd811862b453cc616650cdc10f4d69b239d66943a (diff)
downloadsamba-fec25c3a627bfbb14cf0aaf8773f54e0e5017517.tar.gz
samba-fec25c3a627bfbb14cf0aaf8773f54e0e5017517.tar.bz2
samba-fec25c3a627bfbb14cf0aaf8773f54e0e5017517.zip
ntlmssp: Add ntlmssp_blob_matches_magic()
This avoids having the same check in 3 different parts of the code Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Aug 3 12:45:04 CEST 2011 on sn-devel-104
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/ntlmssp/ntlmssp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/auth/ntlmssp/ntlmssp.c b/source4/auth/ntlmssp/ntlmssp.c
index a53e5547ab..d90c908d8d 100644
--- a/source4/auth/ntlmssp/ntlmssp.c
+++ b/source4/auth/ntlmssp/ntlmssp.c
@@ -63,7 +63,7 @@ static const struct ntlmssp_callbacks {
static NTSTATUS gensec_ntlmssp_magic(struct gensec_security *gensec_security,
const DATA_BLOB *first_packet)
{
- if (first_packet->length > 8 && memcmp("NTLMSSP\0", first_packet->data, 8) == 0) {
+ if (ntlmssp_blob_matches_magic(first_packet)) {
return NT_STATUS_OK;
} else {
return NT_STATUS_INVALID_PARAMETER;