diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-09-30 10:02:01 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2014-09-30 23:35:08 +0200 |
commit | 6a82cb7b687caa89c7e994b85715a15bfe6d3fe3 (patch) | |
tree | dcabc67b336ad6e5ec96d0194dce25b48668963c /libcli/smb | |
parent | a51b6232d2822d48ffef089dca95b52ec052d9cc (diff) | |
download | samba-6a82cb7b687caa89c7e994b85715a15bfe6d3fe3.tar.gz |
libcli/smb: list NT_STATUS_FILE_CLOSED as expected ioctl response.
Some IOCTL requests change the behavior with new protocol versions.
E.g. FSCTL_VALIDATE_NEGOTIATE_INFO resulted in NT_STATUS_FILE_CLOSED
for old servers.
As SMB2 signing might be skipped for responses with NT_STATUS_FILE_CLOSED
we need to list it explicitly in the expected return values.
This way we'll get NT_STATUS_ACCESS_DENIED, if the server doesn't
sign the response to a signed requests.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'libcli/smb')
-rw-r--r-- | libcli/smb/smb2cli_ioctl.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libcli/smb/smb2cli_ioctl.c b/libcli/smb/smb2cli_ioctl.c index 30906935b61..b0f8eea65b0 100644 --- a/libcli/smb/smb2cli_ioctl.c +++ b/libcli/smb/smb2cli_ioctl.c @@ -184,7 +184,17 @@ static void smb2cli_ioctl_done(struct tevent_req *subreq) { .status = STATUS_BUFFER_OVERFLOW, .body_size = 0x31 - } + }, + { + /* + * We need to make sure that + * a response with NT_STATUS_FILE_CLOSED + * without signing generates NT_STATUS_ACCESS_DENIED + * if the request was signed. + */ + .status = NT_STATUS_FILE_CLOSED, + .body_size = 0x09, + }, }; status = smb2cli_req_recv(subreq, state, &iov, |