summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/libsmb/ntlmssp.c15
2 files changed, 16 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 035d87e321..14fe730b40 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -998,6 +998,7 @@ void ntlmssp_want_feature_list(struct ntlmssp_state *ntlmssp_state, char *featur
void ntlmssp_want_feature(struct ntlmssp_state *ntlmssp_state, uint32_t feature);
NTSTATUS ntlmssp_update(struct ntlmssp_state *ntlmssp_state,
const DATA_BLOB in, DATA_BLOB *out) ;
+bool ntlmssp_is_anonymous(struct ntlmssp_state *ntlmssp_state);
NTSTATUS ntlmssp_server_start(TALLOC_CTX *mem_ctx,
bool is_standalone,
const char *netbios_name,
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.
*