mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
smbXcli: remove unused smb1cli_have_andx_command()
metze
This commit is contained in:
parent
fee3a0a657
commit
e2912fa853
@ -381,38 +381,6 @@ static NTSTATUS smb1cli_pull_raw_error(const uint8_t *hdr)
|
||||
return NT_STATUS_DOS(CVAL(hdr, HDR_RCLS), SVAL(hdr, HDR_ERR));
|
||||
}
|
||||
|
||||
/**
|
||||
* Figure out if there is an andx command behind the current one
|
||||
* @param[in] buf The smb buffer to look at
|
||||
* @param[in] ofs The offset to the wct field that is followed by the cmd
|
||||
* @retval Is there a command following?
|
||||
*/
|
||||
|
||||
static bool smb1cli_have_andx_command(const uint8_t *buf,
|
||||
uint16_t ofs,
|
||||
uint8_t cmd)
|
||||
{
|
||||
uint8_t wct;
|
||||
size_t buflen = talloc_get_size(buf);
|
||||
|
||||
if (!smb1cli_is_andx_req(cmd)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((ofs == buflen-1) || (ofs == buflen)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
wct = CVAL(buf, ofs);
|
||||
if (wct < 2) {
|
||||
/*
|
||||
* Not enough space for the command and a following pointer
|
||||
*/
|
||||
return false;
|
||||
}
|
||||
return (CVAL(buf, ofs+1) != 0xff);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is the SMB command able to hold an AND_X successor
|
||||
* @param[in] cmd The SMB command in question
|
||||
|
Loading…
Reference in New Issue
Block a user