1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

179 Commits

Author SHA1 Message Date
Volker Lendecke
cc825231cd s3: Explicitly pass sconn to recalc_brl_timeout 2010-06-12 15:42:56 +02:00
Volker Lendecke
ec2079f5d0 s3: Explicitly pass sconn to blocking_lock_was_deferred_smb1 2010-06-12 15:42:56 +02:00
Volker Lendecke
f856fb0b35 s3: Explicitly pass sconn to remove_pending_lock_requests_by_mid_smb1 2010-06-12 15:42:56 +02:00
Volker Lendecke
91bd52da1a s3: Remove smbd_server_conn from cancel_pending_lock_requests_by_fid 2010-06-12 15:42:56 +02:00
Volker Lendecke
034e616448 s3: Remove smbd_server_conn from push_blocking_lock_request 2010-06-12 15:42:56 +02:00
Volker Lendecke
bfd5f24fa1 s3: Remove smbd_server_conn from brl_timeout_fn 2010-06-12 15:42:56 +02:00
Jeremy Allison
d28fa8faab Rename "allow_smb2" -> "using_smb2" and make the usage clearer. 2010-06-09 19:12:02 -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
a77a8a5e35 Fix more SMB2 locking. We still crash but this won't last :-).
Jeremy.
2010-05-06 08:22:13 -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
62143543ce Fixed issue with return in a void function found by Björn JACKE <bj@SerNet.DE>
Jeremy.
2010-05-05 06:09:03 -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
ebf6340bb5 Move the global blocking lock records into the smb1 state.
Jeremy
2010-04-29 16:50:15 -07:00
Jeremy Allison
7984243768 Move to using 64-bit mid values in our internal open file database.
This will allow us to share logic much easier between SMB1 and SMB2
servers.

Jeremy
2010-04-12 21:40:28 -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
Steven Danneman
cb0ea27369 s3/smbd: change locking behavior when "lock spin time = 0".
The "lock spin time" parameter mimics the following Windows
setting which by default is 250ms in Windows and 200ms in Samba.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\LockViolationDelay

When a client sends repeated, non-blocking, contending BRL requests
to a Windows server, after the first Windows starts treating these
requests as timed blocking locks with the above timeout.

As an efficiency, I've changed the behavior when this setting is 0,
to skip this logic and treat all requests as non-blocking locks.

This gives the smbd server behavior similar to the 3.0 release with
the do_spin_lock() implementation.

I've also changed the blocking lock parameter in the call from
push_blocking_lock_request() to true as all requests made in this
path are blocking by definition.
2010-02-12 21:29:00 -08:00
Jeremy Allison
b93f07ef41 Fix trailing whitespace errors I added (sorry).
Jeremy.
2010-02-05 22:51:11 -08:00
Andrew Tridgell
5b398edbee s3-brlock: add a minimim retry time for pending blocking locks
When we are waiting on a pending byte range lock, another smbd might
exit uncleanly, and therefore not notify us of the removal of the
lock, and thus not trigger the lock to be retried.

We coped with this up to now by adding a message_send_all() in the
SIGCHLD and cluster reconfigure handlers to send a MSG_SMB_UNLOCK to
all smbd processes. That would generate O(N^2) work when a large
number of clients disconnected at once (such as on a network outage),
which could leave the whole system unusable for a very long time (many
minutes, or even longer).

By adding a minimum re-check time for pending byte range locks we
avoid this problem by ensuring that pending locks are retried at a
more regular interval.
2010-02-05 22:17:17 -08:00
Jeremy Allison
9a2112ec66 Second part of the fix for bug 6828 - infinite timeout occurs when byte lock held outside of samba.
Fixes case where a connection with a pending lock can me marked "idle", and ensures
that the lock queue timeout is always recalculated.
Jeremy.
2009-10-26 21:20:22 -07:00
Jeremy Allison
bb7cf9ad23 Fix bug 6828 - infinite timeout occurs when byte lock held outside of samba
Jeremy.
2009-10-20 17:52:34 -07:00
Tim Prouty
5a8d70d465 s3: Change fsp->fsp_name to be an smb_filename struct! 2009-07-20 17:26:56 -07:00
Stefan Metzmacher
c16c90a1cb s3:smbd: use new simplified snb_signing code in the server
We keep the seqnum/mid mapping in the smb_request structure.

This also moves one global variable into the
smbd_server_connection struct.

metze
2009-03-23 12:21:13 +01:00
Zack Kirsch
813273c87e Add VFS ops for Windows BRL: Lock, Unlock and Cancel:
This patch adds 3 new VFS OPs for Windows byte range locking: BRL_LOCK_WINDOWS,
BRL_UNLOCK_WINDOWS and BRL_CANCEL_WINDOWS. Specifically:

* I renamed brl_lock_windows, brl_unlock_windows and brl_lock_cancel to
  *_default as the default implementations of the VFS ops.
* The blocking_lock_record (BLR) is now passed into the brl_lock_windows and
  brl_cancel_windows paths. The Onefs implementation uses it - future
  implementations may find it useful too.
* Created brl_lock_cancel to do what brl_lock/brl_unlock do: set up a
  lock_struct and call either the Posix or Windows lock function. These happen
  to be the same for the default implementation.
* Added helper functions: increment_current_lock_count() and
  decrement_current_lock_count().
* Minor spelling correction in brl_timeout_fn: brl -> blr.
* Changed blocking_lock_cancel() to return the BLR that it has cancelled. This
  allows us to assert its the lock that we wanted to cancel. If this assert ever
  fires, this path will need to take in the BLR to cancel, rather than choosing
  on its own.
* Adds a small helper function: find_blocking_lock_record_by_id(). Used by the
  OneFS implementation, but could be useful for others.
2009-02-13 10:08:40 -08:00
Zack Kirsch
eb3d964f20 Remove typedef struct blocking_lock_record and move references to struct blocking_lock_record. 2009-02-13 10:08:27 -08:00
todd stecher
54c51a66e3 S3: New module interface for SMB message statistics gathering
This changelist allows for the addition of custom performance
monitoring modules through smb.conf. Entrypoints in the main message
processing code have been added to capture the command, subop, ioctl,
identity and message size statistics.
2009-02-09 13:23:44 -08:00
Volker Lendecke
d94e9c802c Remove the global variable "chain_size" 2009-01-31 11:09:39 +01:00
Volker Lendecke
ba981128ac Add a new implementation of chain_reply
This the global variable "orig_inbuf" in the old chain_reply code. This global
variable was one of the reasons why we had the silly restriction to not allow
async requests within a request chain.
2009-01-16 13:00:28 +01:00
Stefan Metzmacher
3dde0cbb76 s3:smbd: move all globals and static variables in globals.[ch]
The goal is to move all this variables into a big context structure.

metze
2009-01-08 12:22:21 +01:00
Stefan Metzmacher
c34d5f445a s3:events: change event_add_timed() prototype to match samba4
metze
2009-01-05 15:07:35 +01:00
Volker Lendecke
8315677ca3 Do not write into inbuf for the transs request
Instead, fix up the outbuf in send_xx_reply. In those routines, we know
what we are returning.
2008-11-08 10:42:29 +01:00
Volker Lendecke
5e2956557b Remove the change to the user context in process_blocking_lock_queue() 2008-11-08 10:42:28 +01:00
Volker Lendecke
6b4d48c4bf Convert blocking.c to store a smb_request instead of just inbuf 2008-11-04 20:52:07 +01:00
Volker Lendecke
d5f91d7a08 Simplify logic of cancel_pending_lock_requests_by_fid()
The only caller of this function is locking_close_file(). This checks itself if
brl_lock != NULL. The additional check is not necessary here.
2008-11-04 20:52:07 +01:00
Volker Lendecke
3376e7a6a0 Slightly simplify logic in process_lockingX()
The "else" is pointless here, we did a "return True" in the if branch.
2008-11-04 20:52:07 +01:00
Volker Lendecke
59e237cae5 Slightly simplify logic in remove_pending_lock_requests_by_mid()
Use "continue" for (SVAL(blr->inbuf,smb_mid) != mid)
2008-11-04 20:52:07 +01:00
Volker Lendecke
eddb43c713 Slightly simplify logic in cancel_pending_lock_requests_by_fid()
Use a "continue" for (blr->fsp->fnum != fsp->fnum)
2008-11-04 20:52:07 +01:00
Volker Lendecke
f0ba601c26 Convert blocking.c to use talloc 2008-11-04 20:52:06 +01:00
Volker Lendecke
b8125663d9 Make "inbuf" a talloc child of "smb_request" for normal smb requests
This is necessary if we want to keep the whole smb_request for deferred ops.
The explicit settings of req->inbuf will be removed once all those deferring
operations are converted to store the whole request and not just the inbuf.
2008-11-04 20:52:06 +01:00
Volker Lendecke
eb9656e757 Fix nonempty blank lines 2008-11-03 17:58:12 +01:00
Volker Lendecke
7808a2594c Remove some inbuf references by adding "cmd" to smb_request 2008-11-02 23:17:01 +01:00
Volker Lendecke
ab0561f3c3 Apply some const to get_lock_*() 2008-11-01 19:41:07 +01:00
Jelmer Vernooij
4746f79d50 Use {u,}int64_t instead of SMB_BIG_{U,}INT. 2008-10-14 01:59:36 +02:00
Volker Lendecke
d65afbe55f Remove the chain_fsp global 2008-10-13 19:32:39 +02:00
Volker Lendecke
5ddb2abf76 Some more talloc_tos()
(This used to be commit 444e35e7df)
2008-01-10 13:19:58 +01:00
Jeremy Allison
4a413e4bd1 Fix %d / size_t printf arg missmatch.
Jeremy.
(This used to be commit 3e3205309b)
2008-01-05 01:17:33 -08:00
Jeremy Allison
6503c7338e Fix interesting bug found with make valgrindtest. When cancelling
a lock due to file closure make sure we null out the fsp pointer
so it isn't dangling. This is an old bug (not related to the new
changes).
Jeremy.
(This used to be commit b5ee972b0c)
2008-01-04 13:59:26 -08:00
Jeremy Allison
9254bb4ef1 Refactor the crypto code after a very helpful conversation
with Volker. Mostly making sure we have data on the incoming
packet type, not stored in the smb header.
Jeremy.
(This used to be commit c4e5a50504)
2008-01-04 12:56:23 -08:00
Jeremy Allison
c3250149e1 Add new parameter, "min receivefile size" (by default set
to zero). If non-zero, writeX calls greater than this
value will be left in the socket buffer for later handling
with recvfile (or userspace equivalent). Definition of
recvfile for your system is left as an exercise for
the reader (I'm working on getting splice working :-).
Jeremy.
(This used to be commit 11c03b75dd)
2007-10-30 16:22:24 -07:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Volker Lendecke
929e1d9920 r24809: Consolidate the use of temporary talloc contexts.
This adds the two functions talloc_stackframe() and talloc_tos().

 * When a new talloc stackframe is allocated with talloc_stackframe(), then
 * the TALLOC_CTX returned with talloc_tos() is reset to that new
 * frame. Whenever that stack frame is TALLOC_FREE()'ed, then the reverse
 * happens: The previous talloc_tos() is restored.
 *
 * This API is designed to be robust in the sense that if someone forgets to
 * TALLOC_FREE() a stackframe, then the next outer one correctly cleans up and
 * resets the talloc_tos().

The original motivation for this patch was to get rid of the
sid_string_static & friends buffers. Explicitly passing talloc context
everywhere clutters code too much for my taste, so an implicit
talloc_tos() is introduced here. Many of these static buffers are
replaced by a single static pointer.

The intended use would thus be that low-level functions can rather
freely push stuff to talloc_tos, the upper layers clean up by freeing
the stackframe. The more of these stackframes are used and correctly
freed the more exact the memory cleanup happens.

This patch removes the main_loop_talloc_ctx, tmp_talloc_ctx and
lp_talloc_ctx (did I forget any?)

So, never do a

tmp_ctx = talloc_init("foo");

anymore, instead, use

tmp_ctx = talloc_stackframe()

:-)

Volker
(This used to be commit 6585ea2cb7)
2007-10-10 12:30:24 -05:00
Jeremy Allison
d76e724b10 r24791: Fix logic error in timeout of blocking lock processing found by
Ronnie. If a lock timeout expires, we must check we can get the
lock before responding with failure. Volker is writing a torture test.
Jeremy.
(This used to be commit 45380f356b)
2007-10-10 12:30:22 -05:00
Volker Lendecke
b578db69e9 r24702: Remove the old API pointers
(This used to be commit 17df313db4)
2007-10-10 12:30:14 -05:00
Volker Lendecke
ae89ba48ec r24404: Remove get_OutBuffer usage from blocking.c
(This used to be commit cb8fab5663)
2007-10-10 12:29:41 -05:00
Volker Lendecke
c7a425f30f r24163: Remove the send_trans2_replies_new wrapper
This changes send_trans2_replies to not depend on large buffers anymore
and finishes the trans2 conversion.
(This used to be commit b1d133e4ff)
2007-10-10 12:29:16 -05:00
Volker Lendecke
9f3062d8a7 r24160: process_trans2 in smbd/blocking.c used send_trans2_replies.
Fake a struct smb_request here.

Volker
(This used to be commit f712d1c92b)
2007-10-10 12:29:16 -05:00
Volker Lendecke
c1ca4c298b r24070: Apply some const
(This used to be commit e6d592dcb8)
2007-10-10 12:29:01 -05:00
Volker Lendecke
cc6a41017c r23997: Check in the infrastructure for getting rid of the global InBuffer/OutBuffer
The complete history of this patch can be found under
http://www.samba.org/~vlendec/inbuf-checkin/.

Jeremy, Jerry: If possible I would like to see this in 3.2.0. I'm only
checking into 3_2 at the moment, as it currently will slow down operations for
all non-converted (i.e. all at this moment) operations, as it will copy the
talloc'ed inbuf over the global InBuffer. It will need quite a bit of effort
to convert everything necessary for the normal operations an XP box does.

I have patches for negprot, session setup, tcon_and_X, open_and_X, close. More
to come, but I would appreciate some help here.

Volker
(This used to be commit 5594af2b20)
2007-10-10 12:28:53 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
James Peach
b1ce226af8 r23510: Tidy calls to smb_panic by removing trailing newlines. Print the
failed expression in SMB_ASSERT.
(This used to be commit 171dc060e2)
2007-10-10 12:23:23 -05:00
Volker Lendecke
4d5f58c2b9 r23015: Make message_(de)register static to messages.c
(This used to be commit a8082a3c7c)
2007-10-10 12:22:15 -05:00
Jeremy Allison
01a7017d7b r23014: For all branches, ensure that if we're blocked on a POSIX
lock we know nothing about that we retry the lock every
10 seconds instead of waiting for the standard select
timeout. This is how we used to (and are supposed to)
work.
Jeremy.
(This used to be commit fa18fc25a5)
2007-10-10 12:22:15 -05:00
Volker Lendecke
fad7dd8a60 r22868: Replace some message_send_pid calls with messaging_send_pid calls. More
tomorrow.
(This used to be commit 74fa57ca5d)
2007-10-10 12:22:04 -05:00
Volker Lendecke
b92064fcfd r22846: Chunk one to replace message_send_pid with messaging_send: Deep inside
locking/locking.c we have to send retry messages to timed lock holders.
The majority of this patch passes a "struct messaging_context" down
there. No functional change, survives make test.
(This used to be commit bbb5084146)
2007-10-10 12:22:02 -05:00
Volker Lendecke
e6383f4762 r22736: Start to merge the low-hanging fruit from the now 7000-line cluster patch.
This changes "struct process_id" to "struct server_id", keeping both is
just too much hassle. No functional change (I hope ;-))

Volker
(This used to be commit 0ad4b1226c)
2007-10-10 12:21:52 -05:00
Jeremy Allison
0829e1ad1c r22391: Looks bigger than it is. Make "inbuf" available
to all callers of smb_setlen (via set_message()
calls). This will allow the server to reflect back
the correct encryption context.
Jeremy.
(This used to be commit 2d80a96120)
2007-10-10 12:19:30 -05:00
Jeremy Allison
dc90cd89a7 r22389: Start preparing for multiple encryption contexts in the
server. Allow server to reflect back to calling client
the encryption context that was sent.
Jeremy.
(This used to be commit b49e90335d)
2007-10-10 12:19:30 -05:00
Volker Lendecke
496dbdf435 r21879: Move process_blocking_lock_queue to a timed event.
The idea is that we have blocking.c:brl_timeout as a timed
event that is present whenever we do have a blocking lock
pending. It fires brl_timeout_fn() which calls
process_blocking_lock_queue().

Whenever we make changes to blocking_lock_queue, we trigger
a recalc_brl_timeout() which sets a new brl_timout event if
necessary. This makes the call to
blocking_locks_timeout_ms() in setup_select_timeout()
unnecessary, this is implicitly done in
event_add_to_select_args() from the timed events.

Volker
(This used to be commit 7e31b8ce21)
2007-10-10 12:18:42 -05:00
Volker Lendecke
caf8c6a76b r21064: The core of this patch is
void message_register(int msg_type,
                      void (*fn)(int msg_type, struct process_id pid,
-                                void *buf, size_t len))
+                                void *buf, size_t len,
+                                void *private_data),
+                     void *private_data)
 {
        struct dispatch_fns *dfn;

So this adds a (so far unused) private pointer that is passed from
message_register to the message handler. A prerequisite to implement a tiny
samba4-API compatible wrapper around our messaging system. That itself is
necessary for the Samba4 notify system.

Yes, I know, I could import the whole Samba4 messaging system, but I want to
do it step by step and I think getting notify in is more important in this
step.

Volker
(This used to be commit c8ae60ed65)
2007-10-10 12:17:32 -05:00
Jeremy Allison
deaf4131b9 r21062: Should fix the build plus make all refactored
functions return NTSTATUS.
Jeremy.
(This used to be commit 1f3c2b2abc)
2007-10-10 12:17:31 -05:00
James Peach
5bb49b08f3 r20237: Replace exit_server with exit_server_cleanly where appropriate. All
send_smb failures should be clean exits. All times when we exit as
a matter of policy should also be clean exits.
(This used to be commit d6382092e7)
2007-10-10 12:16:34 -05:00
Herb Lewis
791f48f167 r20124: clean up nested extern declaration warnings
(This used to be commit ac3eb7813e)
2007-10-10 12:16:26 -05:00
Stefan Metzmacher
258a465e20 r18605: sync dlinklist.h with samba4, that means DLIST_ADD_END()
and DLIST_DEMOTE() now take the type of the tmp pointer
not the tmp pointer itself anymore.

metze
(This used to be commit 2f58645b70)
2007-10-10 11:51:59 -05:00
Jeremy Allison
6fd4813ece r17541: When returning a trans2 request, if the "max data
bytes returned" is less than the amount we want
to send, return what we can and set STATUS_BUFFER_OVERFLOW
(doserror ERRDOS,ERRbufferoverflow). Required by
OS/2 to handle EA's that are too large. It's hard
to test this in Samba4 smbtorture as the max data
bytes returned is hard coded at 0xffff (as it is
in the Samba3 client libraries also). I used a
custom version of Samba4 smbtorture to test this
out. Might add a "max data bytes" param to make
this testable in the build farm. Confirmed by
"Guenter Kukkukk (sambaos2)" <sambaos2@kukkukk.com>
and Andreas Taegener <atsamba11@eideltown.de>
that this fixes the issue.
Jeremy.
(This used to be commit ff2f1202b7)
2007-10-10 11:38:38 -05:00
Jeremy Allison
2c6030415e r17314: Optimisation for POSIX locking. If we're downgrading
a POSIX lock (applying a read-lock) and we overlap
pending read locks then send them an unlock message,
we may have allowed them to proceed.
Jeremy.
(This used to be commit a7a0b6ba50)
2007-10-10 11:38:25 -05:00
Jeremy Allison
a093a76dc1 r17293: After the results from the cluster tests in Germany,
fix the messaging code to call the efficient calls :

save_re_uid()
set_effective_uid(0);

messaging_op

restore_re_uid();

instead of using heavyweight become_root()/unbecome_root()
pairs around all messaging code. Fixup the messaging
code to ensure sec_init() is called (only once) so that non-root
processes still work when sending messages.

This is a lighter weight solution to become_root()/unbecome_root()
(which swaps all the supplemental groups) and should be more
efficient. I will migrate all server code over to using this
(a similar technique should be used in the passdb backend
where needed).

Jeremy.
(This used to be commit 4ace291278)
2007-10-10 11:38:24 -05:00
Jeremy Allison
b737f26764 r17105: Fix the race Volker found - we had a non-locked
region between detecting a pending lock was needed
and when we added the blocking lock record. Make
sure that we hold the lock over all this period.
Removed the old code for doing blocking locks on
SMB requests that never block (the old SMBlock
and friends).
Discovered something interesting about the strange
NT_STATUS_FILE_LOCK_CONFLICT return. If we asked
for a lock with zero timeout, and we got an error
of NT_STATUS_FILE_LOCK_CONFLICT, treat it as though
it was a blocking lock with a timeout of 150 - 300ms.
This only happens when timeout is sent as zero and
can be seen quite clearly in ethereal. This is the
real replacement for old do_lock_spin() code.
Re-worked the blocking lock select timeout to correctly
use milliseconds instead of the old second level
resolution (far too coarse for this work).
Jeremy.
(This used to be commit b81d6d1ae9)
2007-10-10 11:38:12 -05:00
Jeremy Allison
e1da1fcf12 r17098: Samba3 now cleanly passes Samba4 RAW-LOCK torture
test. Phew - that was painful :-). But what it means
is that we now implement lock cancels and I can add
lock cancels into POSIX lock handling which will fix
the fast/slow system call issue with cifsfs !
Jeremy.
(This used to be commit f1a9cf075b)
2007-10-10 11:38:11 -05:00
Jeremy Allison
fbdcf2663b r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
(This used to be commit 9dafb7f48c)
2007-10-10 11:19:14 -05:00
Jeremy Allison
713eaf1d67 r15083: Using talloc with destructors is nice and all, but in this
case it's in a performace critical path and it *hurts* us.
Go back to plain malloc/free with an explicit destructor
call.
Jeremy.
(This used to be commit 1c99aed563)
2007-10-10 11:16:22 -05:00
Jeremy Allison
22dbd67708 r15018: Merge Volker's ipc/trans2/nttrans changes over
into 3.0. Also merge the new POSIX lock code - this
is not enabled unless -DDEVELOPER is defined.
This doesn't yet map onto underlying system POSIX
locks. Updates vfs to allow lock queries.
Jeremy.
(This used to be commit 08e52ead03)
2007-10-10 11:15:57 -05:00
Gerald Carter
54abd2aa66 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
(This used to be commit 939c3cb5d7)
2007-10-10 11:04:48 -05:00
Jeremy Allison
f2f55d703d r7963: Add aio support to 3.0.
Jeremy.
(This used to be commit 1de27da470)
2007-10-10 10:58:05 -05:00
Jeremy Allison
acf9d61421 r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
(This used to be commit 620f2e608f)
2007-10-10 10:53:32 -05:00
Jeremy Allison
2ea1c9de9f r1980: Re-apply (remember to remove entry from list on delete this time :-).
Jeremy.
(This used to be commit 275a0010f4)
2007-10-10 10:52:26 -05:00
Jeremy Allison
d792569de6 r1978: Roll it back until I do it right.... :-).
Jeremy.
(This used to be commit f16aa99f8c)
2007-10-10 10:52:26 -05:00
Jeremy Allison
4e02b70863 r1976: Simplify, use standard dlist interface.
Jeremy.
(This used to be commit 776c28133d)
2007-10-10 10:52:26 -05:00
Jeremy Allison
2acd084866 r1154: Change default setting for case sensitivity to "auto". If set to auto
then is the client supports it (current clients supported are Samba and
CIFSVFS - detected by the negprot strings "Samba", "POSIX 2" and a bare
"NT LM 0.12" string) then the setting of the per packet flag smb_flag
FLAG_CASELESS_PATHNAMES is taken into account per packet. This allows
the linux CIFS client to use Samba in a case sensitive manner.
Additional command in smbclient "case_sensitive", toggles the
flag in subsequent packets.
Docs to follow.
Jeremy.
(This used to be commit cf84c0fe1a)
2007-10-10 10:51:57 -05:00
Jeremy Allison
f589164ed9 Patch from Stefan Metzmacher <metze@metzemix.de> to fix signing problems
when reverse connecting back to a client for printer notify.
Jeremy.
(This used to be commit 06aa434c3f)
2003-10-21 21:19:00 +00:00
Jeremy Allison
6af214dbb0 Ensure cancelling a blocking lock returns the correct error message.
Testing with Samba4 RAW-MUX code.
Jeremy.
(This used to be commit 533847c95d)
2003-10-10 02:02:05 +00:00
Jeremy Allison
22c0241571 Changes to allow Samba3 to pass the Samba4 RAW-READ tests.
Jeremy.
(This used to be commit e7565dbba6)
2003-10-09 01:46:01 +00:00
Jeremy Allison
110abf10d2 Turns out I had my packet sequences wrong for oplock break code.
I was storing the mid of the oplock break - I should have been
storing the mid from the open. There are thus 2 types of deferred
packet sequence returns - ones that increment the sequence number
(returns from oplock causing opens) and ones that don't (change notify
returns etc). Running with signing forced on does lead to some
interesting tests :-).
Jeremy.
(This used to be commit 85907f02ce)
2003-08-07 02:59:52 +00:00
Jeremy Allison
0c9433c031 Ensure everywhere we defer an incoming SMB request (blocking lock queue,
in oplock break state, change notify queue) we also push the MID onto
the deferred signing queue. Tomorrow I will test this with valgrind and
oplock tests.
Jeremy.
(This used to be commit 33a377f372)
2003-07-24 06:56:56 +00:00
Jeremy Allison
34226f1bd4 Fix for very subtle POSIX lock interaction race condition found by
Herb. We need to unlock POSIX locks before notifying pending lock
processes.
Jeremy.
(This used to be commit 6999eef51c)
2003-04-04 20:38:12 +00:00
Jeremy Allison
fb3e4b8797 Fix to allow blocking lock notification to be done rapidly (no wait
for smb -> smb lock release). Adds new PENDING_LOCK type to lockdb
(does not interfere with existing locks).
Jeremy.
(This used to be commit 766928bbba)
2003-02-27 01:04:34 +00:00
Jeremy Allison
6a019636b9 Fixed nasty bug where file writes with start offsets in the range
0x80000000 -> 0xFFFFFFFF would fail as they were being cast
from IVAL (uint32) to SMB_OFF_T (off_t or off64_t, both *signed* types).
The sign extension would cause the offset to be treated as negative.
Thanks to Herb for helping me track this one down (IRIX is good for large
file tests :-).
Jeremy.
PS. That horrid EXEXIST thing has broken configure.....
(This used to be commit 2d14c442bc)
2002-12-03 08:02:41 +00:00
Gerald Carter
a834a73e34 sync'ing up for 3.0alpha20 release
(This used to be commit 65e7b5273b)
2002-09-25 15:19:00 +00:00