Stefan Metzmacher
704cf10645
s3:smbd: avoid using sconn_server_id()
...
metze
2011-12-16 13:19:32 +01:00
Stefan Metzmacher
ffa996e479
s3:smb2_lock: use talloc_get_type_abort() as private_data can't be NULL
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Dec 14 13:34:25 CET 2011 on sn-devel-104
2011-12-14 13:34:25 +01:00
Stefan Metzmacher
f59d358653
s3:smb2_lock: pass smbd_server_connection as private_data to received_unlock_msg()
...
metze
2011-12-12 20:14:41 +01:00
Stefan Metzmacher
763fe4216b
s3:smb2_server: use sconn->ev_ctx instead of sconn->smb2.event_ctx
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Dec 12 16:08:59 CET 2011 on sn-devel-104
2011-12-12 16:08:59 +01:00
Stefan Metzmacher
7081d7e78f
s3:smb2_lock: avoid using server_event_context()
...
metze
2011-12-12 14:35:43 +01:00
Stefan Metzmacher
88dd90d928
s3:smb2_server: pass explicit defer_times to smbd_smb2_request_pending_queue()
...
metze
2011-11-15 17:14:13 +01:00
Stefan Metzmacher
a358eee2d8
s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_lock.c
...
metze
2011-09-07 10:38:06 +02:00
Rusty Russell
56e72337b0
lib/util/time.c: timeval_current_ofs_msec
...
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-06-01 10:38:47 +02:00
Andrew Bartlett
e5dd03d199
s3-globals Remove smbd_event_context() (use server_event_context())
...
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-31 00:32:07 +02:00
Günther Deschner
50883cfeb4
s3-tevent: only include ../lib/util/tevent wrappers where needed.
...
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Apr 29 14:00:30 CEST 2011 on sn-devel-104
2011-04-29 14:00:30 +02:00
Günther Deschner
ab36d597e7
s3-messages: make ndr_messaging.h part of messages.h.
...
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
b2af281e50
s3-messages: only include messages.h where needed.
...
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
8c24ebf371
s3: include smbd/smbd.h where needed.
...
Guenther
2011-03-30 01:13:08 +02:00
Volker Lendecke
898f7c9603
s3: Remove smbd_server_conn from smb2 receive_unlock_msg
2010-10-03 18:17:08 +02:00
Volker Lendecke
b0f76a37d3
s3: Remove procid_self() from cancel_pending_lock_requests_by_fid_smb2()
2010-07-05 11:06:31 +02:00
Volker Lendecke
a521ad4b5a
s3: Remove procid_self() from remove_pending_lock()
2010-07-05 11:06:31 +02:00
Volker Lendecke
a2d7cd5558
s3: Remove smbd_messaging_context() from reprocess_blocked_smb2_lock()
2010-07-05 11:06:30 +02:00
Volker Lendecke
3df821acc4
s3: Remove smbd_messaging_context() from remove_pending_lock()
2010-07-05 11:06:29 +02:00
Volker Lendecke
411412dc65
s3: Remove smbd_messaging_context() from push_blocking_lock_request_smb2()
2010-07-05 11:06:29 +02:00
Volker Lendecke
faef081e96
s3: Remove procid_self() from push_blocking_lock_request_smb2()
2010-07-05 11:06:25 +02:00
Andreas Schneider
e716924590
s3-smbd: Make sure that status is initialized when used.
...
Found by clang-analyzer.
2010-06-28 12:56:13 +02:00
Volker Lendecke
14974ba1f1
s3: Remove smbd_server_conn from cancel_pending_lock_requests_by_fid_smb2
2010-06-12 15:42:57 +02:00
Volker Lendecke
5dc2fe5fdc
s3: Explicitly pass sconn to process_blocking_lock_queue_smb2
2010-06-12 15:42:57 +02:00
Volker Lendecke
2592928f00
s3: Remove smbd_server_conn from push_blocking_lock_request_smb2
2010-06-12 15:42:57 +02:00
Jeremy Allison
af44593555
(Finally) fix bug #7158 - SMB2 connection resets during IOZone tests from 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.
2010-05-19 19:28:26 -07:00
Jeremy Allison
0085a3bd2e
Fix the processing of unlocks followed by locks. We now pass SMB2-LOCK test.
...
Jeremy.
2010-05-10 11:29:34 -07:00
Jeremy Allison
a9a3c83b41
Fix more of the SMB2-LOCK tests. Correctly unlock locks on error.
...
Jeremy.
2010-05-10 11:09:41 -07:00
Jeremy Allison
5b7163a23d
Only MULTIPLE-UNLOCK test left to fix !
...
Jeremy.
2010-05-07 07:25:13 -07:00
Jeremy Allison
adf4833792
This patch looks bigger than it is. It does 2 things. 1). Renames smbpid -> 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-07 06:20:50 -07:00
Jeremy Allison
4ad1943d29
Make us pass all SMB2 lock tests except MULTIPLE-UNLOCK and CONTEXT. Them next :-).
...
Jeremy.
2010-05-07 01:20:26 -07:00
Jeremy Allison
1c7a60ef41
Fix cancel by close lock test.
...
Jeremy.
2010-05-06 15:39:21 -07:00
Jeremy Allison
a77a8a5e35
Fix more SMB2 locking. We still crash but this won't last :-).
...
Jeremy.
2010-05-06 08:22:13 -07:00
Jeremy Allison
d58b795587
Move to MS-FSA algorithm when checking for invalid lock range.
...
Satisfies SMB and SMB2.
Jeremy.
2010-05-05 15:57:57 -07:00
Günther Deschner
c6ebab846d
s3: only include gen_ndr headers where needed.
...
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-06 00:22:59 +02:00
Jeremy Allison
d6a6362752
Get closer to passing SMB2 lock test. Still crashes but we get further.
...
More work to follow later.
Jeremy.
2010-05-05 14:54:31 -07:00
Jeremy Allison
f4092ecec7
Plumb the SMB2 front end into the blocking lock backend.
...
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-30 21:03:20 -07:00
Jeremy Allison
e90444319c
Carefully label SMB1-specific locking calls.
...
Jeremy.
2010-04-29 17:08:12 -07:00
Jeremy Allison
e15939b456
Plumb SMB2 stubs into all the places we defer SMB1 operations.
...
Rename functions to be internally consistent. Next step is
to cope queueing single (non-compounded) SMB2 requests to
put some code inside the stubs.
Jeremy.
2010-04-09 19:26:34 -07:00
Jeremy Allison
08b24e923d
Stop smb2 from calling into smb1 blocking lock request code.
...
Allocate a uint16_t internal SMB1 mid for an SMB2 request.
Add a back pointer from the faked up smb_request struct
to the smb2 request.
Getting ready to add restart code for blocking locks,
share mode violations and oplocks in SMB2.
Jeremy.
2010-04-08 22:15:55 -07:00
Stefan Metzmacher
d60f049eaf
s3:smbd: implement SMB2 Cancel correctly.
...
metze
2009-08-17 09:25:45 +02:00
Stefan Metzmacher
1df883aa39
libcli: move some common SMB and SMB2 stuff into libcli/smb/
...
This will hold code that's shared between source3 and source4.
metze
2009-08-12 18:28:32 +02:00
Stefan Metzmacher
9aa1d25907
s3:smbd: rename conn => sconn for smbd_server_connection structs
...
This should avoid confusion between smbd_server_connection
and connection_struct variables.
metze
2009-08-08 10:48:39 +02:00
Tim Prouty
4e516fb191
s3 smb2: Remove unused variable
2009-07-10 12:04:38 -07:00
Stefan Metzmacher
67c7b7f90b
s3:smbd: add support for SMB2 Lock
...
metze
2009-07-10 12:24:25 +02:00
Stefan Metzmacher
be1e5493c5
s3:smbd: pass down the client pid to smbd_smb2_lock_send()
...
metze
2009-07-10 12:24:24 +02:00
Stefan Metzmacher
24c8e786bc
s3:smbd: fix parsing of SMB2 Lock requests with lock_count > 1
...
We should not reuse the variable 'i'.
metze
2009-07-10 12:24:23 +02:00
Stefan Metzmacher
909d42278a
s3:smbd: add marshalling layer for SMB2 Lock support
...
metze
2009-07-02 22:25:49 +02:00