Author: abartlet Date: 2004-12-24 10:56:23 +0000 (Fri, 24 Dec 2004) New Revision: 4357
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4357 Log: Return a more sensible error code if a NULL (as opposed to the valid "") username is asked for. Andrew Bartlett Modified: branches/SAMBA_4_0/source/libcli/auth/ntlmssp.c Changeset: Modified: branches/SAMBA_4_0/source/libcli/auth/ntlmssp.c =================================================================== --- branches/SAMBA_4_0/source/libcli/auth/ntlmssp.c 2004-12-24 09:57:44 UTC (rev 4356) +++ branches/SAMBA_4_0/source/libcli/auth/ntlmssp.c 2004-12-24 10:56:23 UTC (rev 4357) @@ -145,10 +145,11 @@ 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; }