svn commit: samba r14719 - in trunk/source: include libsmb smbd

vlendec at samba.org vlendec at samba.org
Sat Mar 25 15:46:09 GMT 2006


Author: vlendec
Date: 2006-03-25 15:46:06 +0000 (Sat, 25 Mar 2006)
New Revision: 14719

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14719

Log:
As Jeremy put it: You know I will not review this unless it's in the tree :-)

A bit of infrastructure work: The goal is to remove receive_next_smb. This is
a recursive call into the SMB receive routine from the transaction handlers to
receive the subsequent transaction requests. This recursion has two
undesirable effects:

First, it leads to bug #2882. We can not handle multithreaded client
applications (in this case OS/2, no idea about Windows cases).

Second, Samba3 is not purely request->response. With this patch in place, we
are now.

I tried to make the three implementations in ipc.c, trans2.c and nttrans.c as
similar as possible, so that we can review the paranoia checks once and use
'diff' to make sure they are correct in all three cases.

I had to do some changes to smb_signing as well. The current code used to have
trans_start/end routines indicating whether we are in trans state or not,
keeping the sequence number to use for the trans replies. This certainly
breaks when there are multiple outstanding trans states. I realized that with
the current code this is completely unnecessary.

Whenever a packet flows from client to server, we increase the sequence number
by two, no increase on reply. This naturally leads to all the trans responses
to use the last transs sequence number (this was the last packet that we have
received). This works right now as smbd syncronously answers the trans
requests on receiving the last transs. It has to change slighly as Samba3
becomes more async, but at that point the Samba4 implementation becomes more
likely...

Only committing to trunk, I don't think this is material for 3.0.22.

Volker

Modified:
   trunk/source/include/smb.h
   trunk/source/libsmb/clitrans.c
   trunk/source/libsmb/smb_signing.c
   trunk/source/smbd/ipc.c
   trunk/source/smbd/nttrans.c
   trunk/source/smbd/process.c
   trunk/source/smbd/trans2.c


Changeset:
Sorry, the patch is too large (2619 lines) to include; please use WebSVN to see it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14719


More information about the samba-cvs mailing list