summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-04-17 13:34:27 +0200
committerStefan Metzmacher <metze@samba.org>2012-04-17 14:42:31 +0200
commit941a6a78519bd24064ee1919662529bfdd87d78d (patch)
tree99acd48852327fc38c46a039a1ec8ddbfa94a33b /source3/libsmb
parentcb3cde951859852daf830efdeaf8392cf7c89300 (diff)
downloadsamba-941a6a78519bd24064ee1919662529bfdd87d78d.tar.gz
samba-941a6a78519bd24064ee1919662529bfdd87d78d.tar.bz2
samba-941a6a78519bd24064ee1919662529bfdd87d78d.zip
s3:libsmb/ntlmssp: add ntlmssp_is_anonymous()
metze
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/ntlmssp.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c
index 96dc1fb6aa..79c45f697b 100644
--- a/source3/libsmb/ntlmssp.c
+++ b/source3/libsmb/ntlmssp.c
@@ -309,6 +309,21 @@ static NTSTATUS ntlmssp3_client_initial(struct ntlmssp_state *ntlmssp_state,
return NT_STATUS_MORE_PROCESSING_REQUIRED;
}
+bool ntlmssp_is_anonymous(struct ntlmssp_state *ntlmssp_state)
+{
+ const char *user = ntlmssp_state->user;
+
+ if (ntlmssp_state->user == NULL) {
+ return true;
+ }
+
+ if (strlen(ntlmssp_state->user) == 0) {
+ return true;
+ }
+
+ return false;
+}
+
/**
* Next state function for the Challenge Packet. Generate an auth packet.
*