summaryrefslogtreecommitdiffstats
path: root/source3/smbd/blocking.c
Commit message (Collapse)AuthorAgeFilesLines
* s3:smbd: pass smbXsrv_connection to srv_send_smb()Stefan Metzmacher2014-09-191-3/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* smbd: "err" is no longer set in get_lock_offsetVolker Lendecke2014-07-221-4/+2
| | | | | | | This was only referenced in the !HAVE_LONGLONG section Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: brl_lock_cancel does not need "blr" anymoreVolker Lendecke2014-07-041-6/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: do_lock does not need "blr" anymoreVolker Lendecke2014-07-041-6/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: brl_lock does not need "blr" anymoreVolker Lendecke2014-07-041-4/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Remove an outdated commentVolker Lendecke2014-07-041-4/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: smbd: Locking - re-add pending lock records if we fail to acquire a lock ↵Jeremy Allison2014-07-031-17/+80
| | | | | | | | | | | | | | | | | | (and the lock hasn't timed out). Keep the blocking lock record and the pending lock records consistent if we are dealing with multiple blocking lock requests in one SMB1 LockingX request. Ensure we re-add the records under the record lock, to avoid race conditions. Bug #10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout. https://bugzilla.samba.org/show_bug.cgi?id=10684 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* s3: smbd: Locking - treat lock timeout the same as any other error.Jeremy Allison2014-07-031-53/+38
| | | | | | | | | | | | Allows the special case in process_blocking_lock_queue() that talks back to the client to be removed. Bug #10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout. https://bugzilla.samba.org/show_bug.cgi?id=10684 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* s3: smbd: Locking - add and use utility function lock_timed_out().Jeremy Allison2014-07-031-3/+21
| | | | | | | | | Bug #10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout. https://bugzilla.samba.org/show_bug.cgi?id=10684 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* s3: smbd: Locking - convert to using utility macro used elsewhere.Jeremy Allison2014-07-031-2/+1
| | | | | | | | | Bug #10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout. https://bugzilla.samba.org/show_bug.cgi?id=10684 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* smbd: Fix blank line endingsVolker Lendecke2013-09-111-6/+6
|
* Add the ability to send an NTSTATUS result back with a trans2 reply so we ↵Jeremy Allison2013-07-191-1/+1
| | | | | | | | | | | | | can return a parameter block with an error code. This is needed when returning a STATUS_INVALID_NAME result (tested from Windows 2012). Bug 9992 - Windows error 0x800700FE when copying files with xattr names containing ":" Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:smbd: s/struct timed_event/struct tevent_timerStefan Metzmacher2013-02-191-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: s/struct event_context/struct tevent_contextStefan Metzmacher2013-02-191-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3: Fix a crash in reply_lockingX_errorVolker Lendecke2012-08-081-4/+11
| | | | | | | | | | | | | | | | A timed brlock with 2 locks comes in and the second one blocks, file is closed. smbd_cancel_pending_lock_requests_by_fid sets blr->fsp to NULL. reply_lockingX_error (called via MSG_SMB_BLOCKING_LOCK_CANCEL) deferences blr->fsp because blr->lock_num==1 (the second one blocked). This patch fixes the bug by only undoing the locks if fsp!=NULL. fsp==NULL is the close case where everything is undone anyway. Thanks to Peter Somogyi, somogyi@hu.ibm.com for this bug report. Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Aug 8 04:12:04 CEST 2012 on sn-devel-104
* s3:smbd: change blocking.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-14/+15
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Replace chain_replyVolker Lendecke2012-03-101-1/+8
| | | | | | | | | | | This is a new implementation of our andx handling code. The old code was quite involved in that it was called from within the reply_ handlers. This leads to pretty complex faking of smb_request structures to give them the same environment, independent of whether they are called directly or from within chain_reply. chain_reply needs to go because it blocks really async handling of chained requests.
* s3: Make sure the andX chains are ended correctlyVolker Lendecke2012-03-101-0/+2
| | | | Normally chain_reply took care of this. This will go away soon.
* s3: Introduce "req" helper var in reply_lockingX_successVolker Lendecke2012-02-291-3/+5
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Wed Feb 29 03:08:53 CET 2012 on sn-devel-104
* s3:smbd: avoid using sconn_server_id()Stefan Metzmacher2011-12-161-7/+7
| | | | metze
* s3:smbd/blocking: use talloc_get_type_abort() as private_data can't be NULLStefan Metzmacher2011-12-141-10/+2
| | | | metze
* s3:smbd/blocking: pass smbd_server_connection as private_data to ↵Stefan Metzmacher2011-12-131-8/+8
| | | | | | process_blocking_lock_cancel_message() metze
* s3:smbd/blocking: pass smbd_server_connection as private_data to ↵Stefan Metzmacher2011-12-121-4/+4
| | | | | | received_unlock_msg() metze
* s3:smbd/blocking: avoid usage of server_event_context()Stefan Metzmacher2011-12-121-3/+3
| | | | metze
* s3-build: Provide a run-time shim to work around duplicate symbolsAndrew Bartlett2011-06-211-3/+3
| | | | | | | | | | | | | | | | The become_root() and similar 'smbd' functions that are used widely in Samba libraries had 'dummy' copies in dummysmbd.c and dummyroot.c. These have been replaced by a runtime plugin mechanim, which ensures that standlone binaries still do nothing, while in smbd the correct function is used. This avoids having these as duplicate symbols in the smbd binary, which can cause unpredictable behaviour. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* lib/util/time.c: timeval_current_ofs_msecRusty Russell2011-06-011-2/+1
| | | | | | | | | | Several places want "milliseconds from current time", and several were simply doing "msec * 1000" which can (and does in one place) result in a usec value over 1 a million. Using a helper to do this is safer and more readable. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* s3-globals Remove smbd_event_context() (use server_event_context())Andrew Bartlett2011-05-311-1/+1
| | | | | | | | This has been a wrapper around server_event_context() for some time now, and removing this from dummmysmbd.c assists with library dependencies. Andrew Bartlett
* Fix many const compiler warnings.Jeremy Allison2011-05-051-2/+2
|
* s3-messages: make ndr_messaging.h part of messages.h.Günther Deschner2011-03-301-1/+0
| | | | Guenther
* s3-messages: only include messages.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3: include smbd/smbd.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3: Remove smbd_server_conn from process_blocking_lock_cancel_messageVolker Lendecke2010-10-031-1/+7
|
* s3: Remove smbd_server_conn from smb1 receive_unlock_msgVolker Lendecke2010-10-031-1/+9
|
* s3: Make srv_send_smb take an sconn instead of a sock fdVolker Lendecke2010-08-241-2/+2
|
* s3: Remove smbd_server_fd from blocking_lock_reply_errorVolker Lendecke2010-08-161-1/+1
|
* s3: Remove smbd_server_fd from generic_blocking_lock_errorVolker Lendecke2010-08-161-1/+1
|
* s3: Remove procid_self() from blocking_lock_cancel_smb1()Volker Lendecke2010-07-051-1/+1
|
* s3: Remove procid_self() from process_blocking_lock_queue()Volker Lendecke2010-07-051-2/+2
|
* s3: Remove procid_self() from remove_pending_lock_requests_by_mid_smb1()Volker Lendecke2010-07-051-1/+1
|
* s3: Remove procid_self() from cancel_pending_lock_requests_by_fid()Volker Lendecke2010-07-051-1/+1
|
* s3: Remove procid_self() from generic_blocking_lock_error()Volker Lendecke2010-07-051-1/+2
|
* s3: Remove procid_self() from push_blocking_lock_request()Volker Lendecke2010-07-051-1/+1
|
* s3: Remove smbd_messaging_context() from blocking_lock_cancel_smb1()Volker Lendecke2010-07-051-2/+2
|
* s3: Remove smbd_messaging_context() from process_trans2()Volker Lendecke2010-07-051-1/+2
|
* s3: Remove smbd_messaging_context() from process_lockingX()Volker Lendecke2010-07-051-1/+1
|
* s3: Remove smbd_messaging_context() from reply_lockingX_error()Volker Lendecke2010-07-051-1/+1
|
* s3: Remove smbd_messaging_context() from push_blocking_lock_request()Volker Lendecke2010-07-051-2/+2
|
* s3: Explicitly pass sconn to process_blocking_lock_queue_smb2Volker Lendecke2010-06-121-1/+1
|
* s3: Explicitly pass sconn to process_blocking_lock_queueVolker Lendecke2010-06-121-4/+3
|
* s3: Remove smbd_server_conn from blocking_lock_cancel_smb1Volker Lendecke2010-06-121-1/+1
|