diff options
author | Jeremy Allison <jra@samba.org> | 2010-05-05 09:50:48 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-05-05 09:50:48 -0700 |
commit | d8ba02b73d53863d604ccbe0a4391d7b38590c1c (patch) | |
tree | 73d8db31d01311b211b1adceb5ed8363bab19a29 /source3 | |
parent | 19758b354d835546fd9ba9cb8b9299dcea91b723 (diff) | |
download | samba-d8ba02b73d53863d604ccbe0a4391d7b38590c1c.tar.gz samba-d8ba02b73d53863d604ccbe0a4391d7b38590c1c.tar.bz2 samba-d8ba02b73d53863d604ccbe0a4391d7b38590c1c.zip |
Return correct error on read request on directory.
Jeremy.
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/smb2_read.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/smb2_read.c b/source3/smbd/smb2_read.c index a428c26ea2..2f36804bf6 100644 --- a/source3/smbd/smb2_read.c +++ b/source3/smbd/smb2_read.c @@ -224,6 +224,10 @@ static struct tevent_req *smbd_smb2_read_send(TALLOC_CTX *mem_ctx, tevent_req_nterror(req, NT_STATUS_FILE_CLOSED); return tevent_req_post(req, ev); } + if (fsp->is_directory) { + tevent_req_nterror(req, NT_STATUS_INVALID_DEVICE_REQUEST); + return tevent_req_post(req, ev); + } state->out_data = data_blob_talloc(state, NULL, in_length); if (in_length > 0 && tevent_req_nomem(state->out_data.data, req)) { |