summaryrefslogtreecommitdiffstats
path: root/source3/smbd/smb2_notify.c
Commit message (Collapse)AuthorAgeFilesLines
* s3:smb2_notify: make use of smbd_smb2_generate_outbody()Stefan Metzmacher2014-03-051-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smb2_notify: fix use after free on long living notify requestsStefan Metzmacher2014-02-141-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a hack, but it should fix the bug: change_notify_add_request() talloc moves smb_request away, which is not expected by the smb2_notify.c code... smbd_smb2_notify_reply() uses tevent_req_defer_callback() (in older versions an immediate event) to defer the response. This is needed as change_notify_reply() will do more things after calling reply_fn() (smbd_smb2_notify_reply is this case) and often change_notify_remove_request() is called after change_notify_reply(). change_notify_remove_request() implicitly free's the smb_request that was passed to change_notify_add_request(). smbd_smb2_fake_smb_request() added the smb_request as smb2req->smb1req, which is expected to be available after smbd_smb2_notify_recv() returned. The long term solution would be the following interface: struct tevent_req *change_notify_request_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct files_struct *fsp, uint32_t max_length, uint32_t filter, bool recursive); NTSTATUS change_notify_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, DATA_BLOB *buffer); Bug: https://bugzilla.samba.org/show_bug.cgi?id=10442 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Feb 14 11:18:15 CET 2014 on sn-devel-104
* smbd: Avoid calling notify_filter_string for low debuglevelsVolker Lendecke2013-12-041-1/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Dec 4 20:09:39 CET 2013 on sn-devel-104
* s3:smbd: remove struct member smbd_smb2_request.cancelled - it was only writtenMichael Adam2012-09-221-1/+0
|
* s3:smb2_lock: smbd_smb2_notify_recv() can already return NT_STATUS_CANCELEDStefan Metzmacher2012-09-221-18/+0
| | | | | | That's why we can remove the code that violates the tevent_req layers. metze
* s3:smb2_notify: make use of tevent_req_defer_callback() instead of custom ↵Stefan Metzmacher2012-09-221-34/+1
| | | | | | tevent_immediate metze
* s3:smb2_notify: don't call tevent_req_done() from smbd_smb2_notify_cancel()Stefan Metzmacher2012-09-221-2/+1
| | | | | | | smbd_notify_cancel_by_smbreq() will already trigger this via smbd_smb2_notify_reply() and smbd_smb2_notify_reply_trigger(). metze
* s3:smb2_notify: make use of SMBD_SMB2_IN_*_PTR()Stefan Metzmacher2012-08-051-4/+2
| | | | metze
* s3:smbd: make use of smbXsrv_tcon and smbXsrv_session for smb2Stefan Metzmacher2012-06-251-1/+1
| | | | | | | | | The removes the protocol specific smbd_smb2_session and smbd_smb2_tcon. Pair-Programmed-With: Michael Adam <obnox@samba.org> metze
* s3:smbd: change smb2_notify.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-2/+2
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_notify: make use of file_fsp_smb2()Stefan Metzmacher2012-06-091-26/+9
| | | | metze
* s3:smbd: make use of change_notify_fsp_has_changes()Stefan Metzmacher2012-06-061-1/+1
| | | | metze
* s3:smb2_server verify creditchargeChristian Ambach2012-03-091-0/+7
| | | | | | | for all requests that have max_???? checks, also do a check of the creditcharge the client has sent (when using largemtu) Signed-off-by: Jeremy Allison <jra@samba.org>
* s3:smb2_server: use SMB2_WATCH_TREEChristian Ambach2012-03-021-1/+1
| | | | | it makes the code easier to understand if it uses the names specified in MS-SMB2 instead of just the underlying values
* Fix a bunch of "unused variable" warnings.Jeremy Allison2012-02-181-3/+0
| | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Feb 18 06:22:40 CET 2012 on sn-devel-104
* s3:smb2_server: use sconn->ev_ctx instead of sconn->smb2.event_ctxStefan Metzmacher2011-12-121-2/+2
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Mon Dec 12 16:08:59 CET 2011 on sn-devel-104
* s3:smb2_server: pass explicit defer_times to smbd_smb2_request_pending_queue()Stefan Metzmacher2011-11-151-1/+1
| | | | metze
* s3:smb2_server: remember the max_{trans,read,write} sizes we negotiated (bug ↵Stefan Metzmacher2011-10-131-1/+1
| | | | | | | | | #8473) We should enforce the negotiated max sizes instead of the lp_smb2_max_*() sizes. metze
* s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_notify.cStefan Metzmacher2011-09-071-12/+4
| | | | metze
* s3-tevent: only include ../lib/util/tevent wrappers where needed.Günther Deschner2011-04-291-0/+1
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Fri Apr 29 14:00:30 CEST 2011 on sn-devel-104
* s3: include smbd/smbd.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3: change_notify_reply() does not need its "conn" argumentVolker Lendecke2010-06-121-1/+1
|
* s3: Remove sconn arg from smbd_notify_cancel_by_smbreqVolker Lendecke2010-06-121-2/+1
|
* (Finally) fix bug #7158 - SMB2 connection resets during IOZone tests from ↵Jeremy Allison2010-05-191-1/+1
| | | | | | | | | | | | 64-bit Vista client It turns out that the persistent handles are used by the Microsoft redirector to index files on oplock break requests. So even if we don't do durable handles (yet) we must set the persistent handle on create. For now just use the same handle value as we use for volatile. Jeremy.
* Update (C) for 2010.Jeremy Allison2010-04-281-0/+1
| | | | Jeremy.
* Don't free the entire tevent_req on cancel, only the part we need (the ↵Jeremy Allison2010-04-231-9/+12
| | | | | | immediate event). Jeremy.
* Final fix for #7331 - Compound async SMB 2 requests don't work right.Jeremy Allison2010-04-181-0/+7
| | | | | | | | | | | | | | | Don't free the cancelled SMB2 req early, let the cancelation function take care of it. Return a NT_STATUS_CANCELLED when we find and cancel a request. Fix our SMB2 error returns to correctly set the structuresize to 9, and add the expected zero byte (see section 2.2.2 in the SMB2 spec.). This causes Samba to pass the test program in this bug report that W2K8R2 fails (heh heh :-). This is because we always cause compound requests to get to a cancelation point before dealing with a cancel request. Jeremy.
* First part of fix for bug #7331 - Compound async SMB 2 requests don't work ↵Jeremy Allison2010-04-171-0/+10
| | | | | | | | | | | | | | | | right. Gets us handling SMB2 compound async requests similar to W2K8R2 (and triggers the same client bug in the Win7 redirector). Great thanks to Ira Cooper <samba@ira.wakeful.net> for helping with this and to Metze for the wonderful async framework. The one thing I need to fix to make us identical to W2K8R2 is that when a compound request goes async at the end W2K8R2 splits the replies up into a compound non-async reply followed by a separate async reply. Currently we're doing the whole thing in a compound reply. Jeremy.
* Parameterize "smb2 max read", "smb2 max write", "smb2 max trans".Jeremy Allison2010-04-061-1/+1
| | | | | | Set to 64k by default. Jeremy.
* s3:smbd: add support for canceling SMB2 Notify calls.Stefan Metzmacher2009-08-171-0/+17
| | | | metze
* s3:smbd: implement SMB2 Cancel correctly.Stefan Metzmacher2009-08-171-5/+1
| | | | metze
* libcli: move some common SMB and SMB2 stuff into libcli/smb/Stefan Metzmacher2009-08-121-1/+1
| | | | | | This will hold code that's shared between source3 and source4. metze
* s3:smbd: rename conn => sconn for smbd_server_connection structsStefan Metzmacher2009-08-081-5/+5
| | | | | | | This should avoid confusion between smbd_server_connection and connection_struct variables. metze
* Fix a few uninitialized variable warningsVolker Lendecke2009-07-241-1/+1
| | | | I know those warnings are bogus, but both Coverity and gcc don't get it.
* s3: Change fsp->fsp_name to be an smb_filename struct!Tim Prouty2009-07-201-1/+1
|
* s3:smbd: add support for SMB2 NotifyStefan Metzmacher2009-07-021-0/+375
metze