diff options
author | Ralph Boehme <slow@samba.org> | 2019-02-28 14:47:18 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2019-03-11 07:52:24 +0000 |
commit | 021321f5a89e72027b89a0a47553115ab859aff6 (patch) | |
tree | 611bca8a4bcabe0cb35c02fb9c87b3ed72289c6e | |
parent | 66a0bb5575db194d54a1b88410adf321f5f624b5 (diff) | |
download | samba-021321f5a89e72027b89a0a47553115ab859aff6.tar.gz |
s4:libcli: remember return code from maximum access
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13812
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
(cherry picked from commit 9f4ee05295827c9a607e1f63694a17906f777176)
-rw-r--r-- | source4/libcli/raw/interfaces.h | 1 | ||||
-rw-r--r-- | source4/libcli/smb2/create.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/source4/libcli/raw/interfaces.h b/source4/libcli/raw/interfaces.h index 732ba1512dc..43a53f834df 100644 --- a/source4/libcli/raw/interfaces.h +++ b/source4/libcli/raw/interfaces.h @@ -1779,6 +1779,7 @@ union smb_open { /* uint32_t blob_size; */ /* optional return values matching tagged values in the call */ + uint32_t maximal_access_status; uint32_t maximal_access; uint8_t on_disk_id[32]; struct smb2_lease lease_response; diff --git a/source4/libcli/smb2/create.c b/source4/libcli/smb2/create.c index 550069a6cea..eb0f6a421cd 100644 --- a/source4/libcli/smb2/create.c +++ b/source4/libcli/smb2/create.c @@ -360,12 +360,12 @@ NTSTATUS smb2_create_recv(struct smb2_request *req, TALLOC_CTX *mem_ctx, struct /* pull out the parsed blobs */ for (i=0;i<io->out.blobs.num_blobs;i++) { if (strcmp(io->out.blobs.blobs[i].tag, SMB2_CREATE_TAG_MXAC) == 0) { - /* TODO: this also contains a status field in - first 4 bytes */ if (io->out.blobs.blobs[i].data.length != 8) { smb2_request_destroy(req); return NT_STATUS_INVALID_NETWORK_RESPONSE; } + io->out.maximal_access_status = + IVAL(io->out.blobs.blobs[i].data.data, 0); io->out.maximal_access = IVAL(io->out.blobs.blobs[i].data.data, 4); } if (strcmp(io->out.blobs.blobs[i].tag, SMB2_CREATE_TAG_QFID) == 0) { |