diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-04-28 15:15:23 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-05-27 07:13:55 +0200 |
commit | 56ebbb53c80a49f2d8dda8a108afc07669af333e (patch) | |
tree | 53b4ab237291b119916c617e3c4aaa75666b6a49 | |
parent | 9a77cb247d00828845df02030e7d174351daf432 (diff) | |
download | samba-56ebbb53c80a49f2d8dda8a108afc07669af333e.tar.gz samba-56ebbb53c80a49f2d8dda8a108afc07669af333e.tar.bz2 samba-56ebbb53c80a49f2d8dda8a108afc07669af333e.zip |
s3:smbd: add PIPE_BUSY handling for SMBtrans calls on named pipes
metze
-rw-r--r-- | source3/smbd/ipc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c index 97b338a536..08494b4dca 100644 --- a/source3/smbd/ipc.c +++ b/source3/smbd/ipc.c @@ -227,12 +227,23 @@ static void api_dcerpc_cmd(connection_struct *conn, struct smb_request *req, { struct tevent_req *subreq; struct dcerpc_cmd_state *state; + bool busy; if (!fsp_is_np(fsp)) { api_no_reply(conn, req); return; } + /* + * Trans requests are only allowed + * if no other Trans or Read is active + */ + busy = np_read_in_progress(fsp->fake_file_handle); + if (busy) { + reply_nterror(req, NT_STATUS_PIPE_BUSY); + return; + } + state = talloc(req, struct dcerpc_cmd_state); if (state == NULL) { reply_nterror(req, NT_STATUS_NO_MEMORY); |