summaryrefslogtreecommitdiff
path: root/source3/smbd/blocking.c
AgeCommit message (Collapse)AuthorFilesLines
2012-08-08s3: Fix a crash in reply_lockingX_errorVolker Lendecke1-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
2012-06-15s3:smbd: change blocking.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam1-14/+15
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-03-10s3: Replace chain_replyVolker Lendecke1-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.
2012-03-10s3: Make sure the andX chains are ended correctlyVolker Lendecke1-0/+2
Normally chain_reply took care of this. This will go away soon.
2012-02-29s3: Introduce "req" helper var in reply_lockingX_successVolker Lendecke1-3/+5
Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Wed Feb 29 03:08:53 CET 2012 on sn-devel-104
2011-12-16s3:smbd: avoid using sconn_server_id()Stefan Metzmacher1-7/+7
metze
2011-12-14s3:smbd/blocking: use talloc_get_type_abort() as private_data can't be NULLStefan Metzmacher1-10/+2
metze
2011-12-13s3:smbd/blocking: pass smbd_server_connection as private_data to ↵Stefan Metzmacher1-8/+8
process_blocking_lock_cancel_message() metze
2011-12-12s3:smbd/blocking: pass smbd_server_connection as private_data to ↵Stefan Metzmacher1-4/+4
received_unlock_msg() metze
2011-12-12s3:smbd/blocking: avoid usage of server_event_context()Stefan Metzmacher1-3/+3
metze
2011-06-21s3-build: Provide a run-time shim to work around duplicate symbolsAndrew Bartlett1-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>
2011-06-01lib/util/time.c: timeval_current_ofs_msecRusty Russell1-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>
2011-05-31s3-globals Remove smbd_event_context() (use server_event_context())Andrew Bartlett1-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
2011-05-05Fix many const compiler warnings.Jeremy Allison1-2/+2
2011-03-30s3-messages: make ndr_messaging.h part of messages.h.Günther Deschner1-1/+0
Guenther
2011-03-30s3-messages: only include messages.h where needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3: include smbd/smbd.h where needed.Günther Deschner1-0/+1
Guenther
2010-10-03s3: Remove smbd_server_conn from process_blocking_lock_cancel_messageVolker Lendecke1-1/+7
2010-10-03s3: Remove smbd_server_conn from smb1 receive_unlock_msgVolker Lendecke1-1/+9
2010-08-24s3: Make srv_send_smb take an sconn instead of a sock fdVolker Lendecke1-2/+2
2010-08-16s3: Remove smbd_server_fd from blocking_lock_reply_errorVolker Lendecke1-1/+1
2010-08-16s3: Remove smbd_server_fd from generic_blocking_lock_errorVolker Lendecke1-1/+1
2010-07-05s3: Remove procid_self() from blocking_lock_cancel_smb1()Volker Lendecke1-1/+1
2010-07-05s3: Remove procid_self() from process_blocking_lock_queue()Volker Lendecke1-2/+2
2010-07-05s3: Remove procid_self() from remove_pending_lock_requests_by_mid_smb1()Volker Lendecke1-1/+1
2010-07-05s3: Remove procid_self() from cancel_pending_lock_requests_by_fid()Volker Lendecke1-1/+1
2010-07-05s3: Remove procid_self() from generic_blocking_lock_error()Volker Lendecke1-1/+2
2010-07-05s3: Remove procid_self() from push_blocking_lock_request()Volker Lendecke1-1/+1
2010-07-05s3: Remove smbd_messaging_context() from blocking_lock_cancel_smb1()Volker Lendecke1-2/+2
2010-07-05s3: Remove smbd_messaging_context() from process_trans2()Volker Lendecke1-1/+2
2010-07-05s3: Remove smbd_messaging_context() from process_lockingX()Volker Lendecke1-1/+1
2010-07-05s3: Remove smbd_messaging_context() from reply_lockingX_error()Volker Lendecke1-1/+1
2010-07-05s3: Remove smbd_messaging_context() from push_blocking_lock_request()Volker Lendecke1-2/+2
2010-06-12s3: Explicitly pass sconn to process_blocking_lock_queue_smb2Volker Lendecke1-1/+1
2010-06-12s3: Explicitly pass sconn to process_blocking_lock_queueVolker Lendecke1-4/+3
2010-06-12s3: Remove smbd_server_conn from blocking_lock_cancel_smb1Volker Lendecke1-1/+1
2010-06-12s3: Explicitly pass sconn to recalc_brl_timeoutVolker Lendecke1-4/+3
2010-06-12s3: Explicitly pass sconn to blocking_lock_was_deferred_smb1Volker Lendecke1-2/+2
2010-06-12s3: Explicitly pass sconn to remove_pending_lock_requests_by_mid_smb1Volker Lendecke1-2/+2
2010-06-12s3: Remove smbd_server_conn from cancel_pending_lock_requests_by_fidVolker Lendecke1-1/+1
2010-06-12s3: Remove smbd_server_conn from push_blocking_lock_requestVolker Lendecke1-1/+1
2010-06-12s3: Remove smbd_server_conn from brl_timeout_fnVolker Lendecke1-4/+6
2010-06-09Rename "allow_smb2" -> "using_smb2" and make the usage clearer.Jeremy Allison1-3/+3
2010-05-07This patch looks bigger than it is. It does 2 things. 1). Renames smbpid -> ↵Jeremy Allison1-27/+27
smblctx in our locking code. 2). Widens smblctx to 64-bits internally. Preparing to use the SMB2 handle as the locking context. Jeremy.
2010-05-07Make us pass all SMB2 lock tests except MULTIPLE-UNLOCK and CONTEXT. Them ↵Jeremy Allison1-2/+6
next :-). Jeremy.
2010-05-06Fix more SMB2 locking. We still crash but this won't last :-).Jeremy Allison1-3/+2
Jeremy.
2010-05-06s3: only include gen_ndr headers where needed.Günther Deschner1-0/+1
This shrinks include/includes.h.gch by the size of 7 MB and reduces build time as follows: ccache build w/o patch real 4m21.529s ccache build with patch real 3m6.402s pch build w/o patch real 4m26.318s pch build with patch real 3m6.932s Guenther
2010-05-05Fixed issue with return in a void function found by Björn JACKE <bj@SerNet.DE>Jeremy Allison1-1/+2
Jeremy.
2010-04-30Plumb the SMB2 front end into the blocking lock backend.Jeremy Allison1-5/+16
Metze, you'll probably be happier with this work as it doesn't abuse tevent in the way you dislike. This is a first cut at the code, which will need lots of testing but I'm hoping this will give people an idea of where I'm going with this. Jeremy.
2010-04-29Carefully label SMB1-specific locking calls.Jeremy Allison1-5/+14
Jeremy.