diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-04-17 13:36:42 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-04-17 14:42:32 +0200 |
commit | 3207c7f9655c236278d96a0837354d1e58993974 (patch) | |
tree | ea3b574a256d09985ef212518364c9560b81ea6f | |
parent | 941a6a78519bd24064ee1919662529bfdd87d78d (diff) | |
download | samba-3207c7f9655c236278d96a0837354d1e58993974.tar.gz samba-3207c7f9655c236278d96a0837354d1e58993974.tar.bz2 samba-3207c7f9655c236278d96a0837354d1e58993974.zip |
s3:libsmb/ntlmssp: improve anonymous logins
smbtorture3 (and maybe others) use fstrings for 'user' and 'password',
so we need to check for empty strings.
metze
-rw-r--r-- | source3/libsmb/ntlmssp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c index 79c45f697b..66e7102aef 100644 --- a/source3/libsmb/ntlmssp.c +++ b/source3/libsmb/ntlmssp.c @@ -349,8 +349,9 @@ static NTSTATUS ntlmssp3_client_challenge(struct ntlmssp_state *ntlmssp_state, DATA_BLOB session_key = data_blob_null; DATA_BLOB encrypted_session_key = data_blob_null; NTSTATUS nt_status = NT_STATUS_OK; + bool anon = ntlmssp_is_anonymous(ntlmssp_state); - if (ntlmssp_state->use_ccache) { + if (!anon && ntlmssp_state->use_ccache) { struct wbcCredentialCacheParams params; struct wbcCredentialCacheInfo *info = NULL; struct wbcAuthErrorInfo *error = NULL; @@ -483,7 +484,7 @@ noccache: return NT_STATUS_INVALID_PARAMETER; } - if (!ntlmssp_state->nt_hash) { + if (anon || !ntlmssp_state->nt_hash) { static const uint8_t zeros[16] = {0, }; /* do nothing - blobs are zero length */ |