git.samba.org
/
amitay
/
samba.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ntlmssp: Add ntlmssp_blob_matches_magic()
[amitay/samba.git]
/
libcli
/
auth
/
ntlmssp.c
diff --git
a/libcli/auth/ntlmssp.c
b/libcli/auth/ntlmssp.c
index b7f14c153cc94ebec261cdbcd0c246e72a42e011..4817329314af347bdef99874c1ae46d211efee41 100644
(file)
--- a/
libcli/auth/ntlmssp.c
+++ b/
libcli/auth/ntlmssp.c
@@
-132,3
+132,13
@@
void ntlmssp_handle_neg_flags(struct ntlmssp_state *ntlmssp_state,
ntlmssp_state->neg_flags |= NTLMSSP_REQUEST_TARGET;
}
}
ntlmssp_state->neg_flags |= NTLMSSP_REQUEST_TARGET;
}
}
+
+/* Does this blob looks like it could be NTLMSSP? */
+bool ntlmssp_blob_matches_magic(const DATA_BLOB *blob)
+{
+ if (blob->length > 8 && memcmp("NTLMSSP\0", blob->data, 8) == 0) {
+ return true;
+ } else {
+ return false;
+ }
+}