1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-17 02:05:21 +03:00

s3: Remove some unused code

This commit is contained in:
Volker Lendecke 2010-01-02 18:16:30 +01:00
parent 2d75aa04da
commit 6edfbbd79b

View File

@ -606,101 +606,6 @@ end:
return result;
}
/****************************************************************************
Send a extended security session setup blob
****************************************************************************/
static bool cli_session_setup_blob_send(struct cli_state *cli, DATA_BLOB blob)
{
uint32 capabilities = cli_session_setup_capabilities(cli);
char *p;
capabilities |= CAP_EXTENDED_SECURITY;
/* send a session setup command */
memset(cli->outbuf,'\0',smb_size);
cli_set_message(cli->outbuf,12,0,True);
SCVAL(cli->outbuf,smb_com,SMBsesssetupX);
cli_setup_packet(cli);
SCVAL(cli->outbuf,smb_vwv0,0xFF);
SSVAL(cli->outbuf,smb_vwv2,CLI_BUFFER_SIZE);
SSVAL(cli->outbuf,smb_vwv3,2);
SSVAL(cli->outbuf,smb_vwv4,1);
SIVAL(cli->outbuf,smb_vwv5,0);
SSVAL(cli->outbuf,smb_vwv7,blob.length);
SIVAL(cli->outbuf,smb_vwv10,capabilities);
p = smb_buf(cli->outbuf);
memcpy(p, blob.data, blob.length);
p += blob.length;
p += clistr_push(cli, p, "Unix", -1, STR_TERMINATE);
p += clistr_push(cli, p, "Samba", -1, STR_TERMINATE);
cli_setup_bcc(cli, p);
return cli_send_smb(cli);
}
/****************************************************************************
Send a extended security session setup blob, returning a reply blob.
****************************************************************************/
static DATA_BLOB cli_session_setup_blob_receive(struct cli_state *cli)
{
DATA_BLOB blob2 = data_blob_null;
char *p;
size_t len;
if (!cli_receive_smb(cli))
return blob2;
show_msg(cli->inbuf);
if (cli_is_error(cli) && !NT_STATUS_EQUAL(cli_nt_error(cli),
NT_STATUS_MORE_PROCESSING_REQUIRED)) {
return blob2;
}
/* use the returned vuid from now on */
cli->vuid = SVAL(cli->inbuf,smb_uid);
p = smb_buf(cli->inbuf);
blob2 = data_blob(p, SVAL(cli->inbuf, smb_vwv3));
p += blob2.length;
p += clistr_pull(cli->inbuf, cli->server_os, p, sizeof(fstring),
-1, STR_TERMINATE);
/* w2k with kerberos doesn't properly null terminate this field */
len = smb_bufrem(cli->inbuf, p);
if (p + len < cli->inbuf + cli->bufsize+SAFETY_MARGIN - 2) {
char *end_of_buf = p + len;
SSVAL(p, len, 0);
/* Now it's null terminated. */
p += clistr_pull(cli->inbuf, cli->server_type, p, sizeof(fstring),
-1, STR_TERMINATE);
/*
* See if there's another string. If so it's the
* server domain (part of the 'standard' Samba
* server signature).
*/
if (p < end_of_buf) {
p += clistr_pull(cli->inbuf, cli->server_domain, p, sizeof(fstring),
-1, STR_TERMINATE);
}
} else {
/*
* No room to null terminate so we can't see if there
* is another string (server_domain) afterwards.
*/
p += clistr_pull(cli->inbuf, cli->server_type, p, sizeof(fstring),
len, 0);
}
return blob2;
}
/* The following is calculated from :
* (smb_size-4) = 35
* (smb_wcnt * 2) = 24 (smb_wcnt == 12 in cli_session_setup_blob_send() )