{
char credentials[DNLEN+UNLEN+2]; /* we can afford to waste */
+ user[0] = '\0';
+ domain[0] = '\0';
if (!NTLM_LocalCall) {
- user[0] = '\0';
- domain[0] = '\0';
const auto x = ntlm_unpack_auth(auth, user, domain, auth_length);
if (x != NtlmError::None)
/* NP: for some reason this helper sometimes needs to accept
* from clients that send no negotiate packet. */
- if (memcpy(local_nego.hdr.signature, "NTLMSSP", 8) != 0) {
+ if (memcmp(local_nego.hdr.signature, "NTLMSSP", 8) != 0) {
memset(&local_nego, 0, sizeof(ntlm_negotiate)); /* reset */
memcpy(local_nego.hdr.signature, "NTLMSSP", 8); /* set the signature */
local_nego.hdr.type = le32toh(NTLM_NEGOTIATE); /* this is a challenge */
/* let's lowercase them for our convenience */
lc(domain);
lc(user);
- fprintf(stdout, "OK user=\"%s\\%s\"", domain, user);
+ fprintf(stdout, "OK user=\"%s\\%s\"\n", domain, user);
return 1;
}
default: