/* send a session setup command */
memset(cli->outbuf,'\0',smb_size);
- set_message(NULL,cli->outbuf,10, 0, True);
+ set_message(cli->outbuf,10, 0, True);
SCVAL(cli->outbuf,smb_com,SMBsesssetupX);
cli_setup_packet(cli);
uint32 capabilities = cli_session_setup_capabilities(cli);
memset(cli->outbuf, '\0', smb_size);
- set_message(NULL,cli->outbuf,13,0,True);
+ set_message(cli->outbuf,13,0,True);
SCVAL(cli->outbuf,smb_com,SMBsesssetupX);
cli_setup_packet(cli);
fstr_sprintf( lanman, "Samba %s", SAMBA_VERSION_STRING);
memset(cli->outbuf, '\0', smb_size);
- set_message(NULL,cli->outbuf,13,0,True);
+ set_message(cli->outbuf,13,0,True);
SCVAL(cli->outbuf,smb_com,SMBsesssetupX);
cli_setup_packet(cli);
/* send a session setup command */
memset(cli->outbuf,'\0',smb_size);
- set_message(NULL,cli->outbuf,13,0,True);
+ set_message(cli->outbuf,13,0,True);
SCVAL(cli->outbuf,smb_com,SMBsesssetupX);
cli_setup_packet(cli);
/* send a session setup command */
memset(cli->outbuf,'\0',smb_size);
- set_message(NULL,cli->outbuf,12,0,True);
+ set_message(cli->outbuf,12,0,True);
SCVAL(cli->outbuf,smb_com,SMBsesssetupX);
cli_setup_packet(cli);
}
}
- /* we have a reference counter on ntlmssp_state, if we are signing
+ /* we have a reference conter on ntlmssp_state, if we are signing
then the state will be kept by the signing engine */
ntlmssp_end(&ntlmssp_state);
free(OIDs[i]);
}
+ DEBUG(3,("got principal=%s\n", principal ? principal : "<null>"));
if (got_kerberos_mechanism && (principal == NULL)) {
- fstring dns_name;
- fstring nb_name;
-
/*
- * We didn't get a valid principal in the negTokenInit. Fake
- * it, or fall back on NTLM. We prefer to fake it, and hit the
- * translate_name cache to get a REAL realm name.
- */
- if (!(cli->desthost && translate_name(domain, dns_name,
- nb_name) &&
- asprintf(&principal, "host/%s@%s", cli->desthost,
- dns_name))) {
-
- /*
- * It is WRONG to depend on the principal sent in the
- * negprot reply, but right now we do it. So for safety
- * (don't segfault later) disable Kerberos when no
- * principal was sent. -- VL
- */
- DEBUG(1, ("Kerberos mech was offered, but no principal was "
- "sent, disabling Kerberos\n"));
- cli->use_kerberos = False;
- }
-
+ * It is WRONG to depend on the principal sent in the negprot
+ * reply, but right now we do it. So for safety (don't
+ * segfault later) disable Kerberos when no principal was
+ * sent. -- VL
+ */
+ DEBUG(1, ("Kerberos mech was offered, but no principal was "
+ "sent, disabling Kerberos\n"));
+ cli->use_kerberos = False;
}
- DEBUG(3,("got principal=%s\n", principal ? principal : "<null>"));
-
fstrcpy(cli->user_name, user);
#ifdef HAVE_KRB5
ntlmssp:
- /* NTLM is sensitive to adding a domain with a UPN */
- return ADS_ERROR_NT(cli_session_setup_ntlmssp(cli, user, pass,
- (strchr(user, '@') ? NULL : domain)));
+ return ADS_ERROR_NT(cli_session_setup_ntlmssp(cli, user, pass, domain));
}
/****************************************************************************
}
return NT_STATUS_OK;
+
}
/****************************************************************************
BOOL cli_ulogoff(struct cli_state *cli)
{
memset(cli->outbuf,'\0',smb_size);
- set_message(NULL,cli->outbuf,2,0,True);
+ set_message(cli->outbuf,2,0,True);
SCVAL(cli->outbuf,smb_com,SMBulogoffX);
cli_setup_packet(cli);
SSVAL(cli->outbuf,smb_vwv0,0xFF);
slprintf(fullshare, sizeof(fullshare)-1,
"\\\\%s\\%s", cli->desthost, share);
- set_message(NULL,cli->outbuf,4, 0, True);
+ set_message(cli->outbuf,4, 0, True);
SCVAL(cli->outbuf,smb_com,SMBtconX);
cli_setup_packet(cli);
BOOL cli_tdis(struct cli_state *cli)
{
memset(cli->outbuf,'\0',smb_size);
- set_message(NULL,cli->outbuf,0,0,True);
+ set_message(cli->outbuf,0,0,True);
SCVAL(cli->outbuf,smb_com,SMBtdis);
SSVAL(cli->outbuf,smb_tid,cli->cnum);
cli_setup_packet(cli);
memset(cli->outbuf,'\0',smb_size);
/* setup the protocol strings */
- set_message(NULL,cli->outbuf,0,0,True);
+ set_message(cli->outbuf,0,0,True);
p = smb_buf(cli->outbuf);
for (numprots=0;
numprots++)
plength += strlen(prots[numprots].name)+2;
- set_message(NULL,cli->outbuf,0,plength,True);
+ set_message(cli->outbuf,0,plength,True);
p = smb_buf(cli->outbuf);
for (numprots=0;
memset(cli->outbuf,'\0',smb_size);
memset(cli->inbuf,'\0',smb_size);
- set_message(NULL,cli->outbuf, 0, 0, True);
+ set_message(cli->outbuf, 0, 0, True);
SCVAL(cli->outbuf,smb_com,SMBtcon);
cli_setup_packet(cli);