diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-12-24 10:56:23 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:07:37 -0500 |
commit | 06275d6197f05ad01f2ec5571698fba79cdd68bb (patch) | |
tree | 872cb615523ee0f97ba44203019e5b8e50ce507d /source4/libcli | |
parent | 90b299603f7a8bc03617ae08d2fd7063d249bd24 (diff) | |
download | samba-06275d6197f05ad01f2ec5571698fba79cdd68bb.tar.gz samba-06275d6197f05ad01f2ec5571698fba79cdd68bb.tar.bz2 samba-06275d6197f05ad01f2ec5571698fba79cdd68bb.zip |
r4357: Return a more sensible error code if a NULL (as opposed to the valid
"") username is asked for.
Andrew Bartlett
(This used to be commit 9c9055603e1171e204f67b019900339f88414841)
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/auth/ntlmssp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/libcli/auth/ntlmssp.c b/source4/libcli/auth/ntlmssp.c index bee93985ac..6ece0f6df6 100644 --- a/source4/libcli/auth/ntlmssp.c +++ b/source4/libcli/auth/ntlmssp.c @@ -145,10 +145,11 @@ static NTSTATUS set_challenge(struct ntlmssp_state *ntlmssp_state, DATA_BLOB *ch NTSTATUS ntlmssp_set_username(struct ntlmssp_state *ntlmssp_state, const char *user) { - ntlmssp_state->user = talloc_strdup(ntlmssp_state, user); if (!user) { - ntlmssp_state->user = NULL; + /* it should be at least "" */ + return NT_STATUS_INVALID_PARAMETER; } + ntlmssp_state->user = talloc_strdup(ntlmssp_state, user); if (!ntlmssp_state->user) { return NT_STATUS_NO_MEMORY; } |