s3: simplify smb signing code

Jeremy Allison jra at samba.org
Tue Mar 10 00:29:03 GMT 2009


On Mon, Mar 09, 2009 at 06:47:53PM +0100, Stefan (metze) Metzmacher wrote:
> Volker Lendecke schrieb:
> > On Mon, Mar 09, 2009 at 05:40:23PM +0100, Stefan (metze) Metzmacher wrote:
> >> I've simplified the smb_signing code in source3
> >> (I removed about 1000 lines and added 500 :-)
> >>
> >> It the caller maintains the mid/seqnum mapping the basic
> >> signing engine is much easier.
> >>
> >> The design a similar to what source4 already has, but I think
> >> the new code is also a bit easier as the current source4 signing code.
> >>
> >> When we have unified the DEBUG code, we can let source4 also use the new
> >> code...
> >>
> >> Please review the patches in this branch
> >> http://gitweb.samba.org/?p=metze/samba/wip.git;a=shortlog;h=refs/heads/master3-signing
> >>
> >> I need to do some more testing, but smbclient works against windows and
> >> samba.
> > 
> > smbclient is easy, it's rpcclient with --enable-developer
> > that triggers transs. That's the one to get right :-)
> 
> Hmm, this will also break, cli_write() as it uses
> cli_send_smb() which stores the last seqnum in cli_state.
> 
> I'll think about a possible solution tomorrow.

I like the design of the new code, especially moving
the seqnum into the req struct in the server.

If you can fix the issue Volker brought up (and
we test it enough of course :-) then it's a +1
from me on this.

Jeremy.


More information about the samba-technical mailing list