summaryrefslogtreecommitdiffstats
path: root/source/libsmb/smb_signing.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix signing miss-sequence noticed by Stefan Metzmacher <metze@metzemix.de>Jeremy Allison2003-10-211-46/+27
| | | | Jeremy.
* Enable us to see what sequence number we were expecting when we fail a signJeremy Allison2003-10-141-4/+4
| | | | | (should help track down out of sequence bugs). Jeremy.
* get rid of more compiler warningsHerb Lewis2003-08-151-18/+18
|
* An oplock break reply from the client causes the sequence number to beJeremy Allison2003-08-071-1/+40
| | | | | | updated by 2 if there is no open reply outstanding, else by one.... Yes - this makes no sense.... Jeremy.
* Turns out I had my packet sequences wrong for oplock break code.Jeremy Allison2003-08-071-46/+19
| | | | | | | | | | 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.
* Fix oplock break detection code on incoming oplock break responses. ThisJeremy Allison2003-08-031-7/+15
| | | | | fixes signing for oplocks. Jeremy.
* Ensure we don't leak any sign records on cancel of pending requests.Jeremy Allison2003-08-021-0/+27
| | | | Jeremy.
* Only look for mid sign records on incoming packets for oplock break replies.Jeremy Allison2003-08-021-20/+28
| | | | | | | Otherwise we find spurious mid sign records on reply_ntcancel calls (they cancel by mid). That took a *lot* of tracking down. I still need to remove the mid records from the sign state on reply_ntcancel to avoid leaking memory.... Jeremy.
* More fixes for client and server side signing. Ensure sequence numbersJeremy Allison2003-08-021-15/+42
| | | | | | are updated correctly on returning an error for server trans streams. Ensure we turn off client trans streams on error. Jeremy.
* Leave the packet sequence checkers enabled whilst I track down a smbclient ↵Jeremy Allison2003-08-021-2/+2
| | | | | | | -> smbd sequence number problem. Jeremy.
* Add the same signing code to the server. Ensure we use identical sessionJeremy Allison2003-08-021-12/+64
| | | | | numbers and MIDs when in trans/trans2/nttrans code. Jeremy.
* Correct fix (removed the earlier band-aid) for what I thought was a signingJeremy Allison2003-08-021-2/+65
| | | | | | | | | | | | bug with w2k. Turns out that when we're doing a trans/trans2/nttrans call the MID and send_sequence_number and reply_sequence_number must remain constant. This was something we got very wrong in earlier versions of Samba. I can now get a directory listing from WINNT\SYSTEM32 with the older earlier parameters for clilist.c This still needs to be fixed for the server side of Samba, client appears to be working happily now (I'm doing a signed smbtar download of an entire W2K3 image to test this :-). Jeremy.
* Turn the 'doing_signing' variable on - fix bug where it was only being setJeremy Allison2003-07-311-1/+1
| | | | | on when signing was mandatory. Jeremy.
* Fix commentAndrew Bartlett2003-07-271-1/+1
|
* W00t! Client smb signing is now working correctly with krb5 and w2k server.Jeremy Allison2003-07-251-0/+15
| | | | | | | | | Server code *should* also work (I'll check shortly). May be the odd memory leak. Problem was we (a) weren't setting signing on in the client krb5 sessionsetup code (b) we need to ask for a subkey... (c). The client and server need to ask for local and remote subkeys respectively. Thanks to Paul Nelson @ Thursby for some sage advice on this :-). Jeremy.
* Fix packet signing with asynchronous oplock breaks. Removed bad error messageJeremy Allison2003-07-241-5/+67
| | | | | | due to w2k bug. I think this code is now working.... Need more testing of course but works on all the obvious cases I can think of. Jeremy.
* SMB signing is now working with change notify. Need to fix the disconnectJeremy Allison2003-07-241-18/+28
| | | | | when bad signature received, plus check the oplock breaks.... Jermey.
* Server side NTLM signing works - until the first async packet. Working on thisJeremy Allison2003-07-241-22/+114
| | | | | next.... Jeremy.
* Don't check in two places for signing turned off...Jeremy Allison2003-07-231-3/+0
| | | | Jeremy.
* Signing so far... the client code fails on a SMBtrans2 secondary transactionJeremy Allison2003-07-181-50/+114
| | | | | | | I think (my changes haven't affected this I believe). Initial support on the server side for smbclient. Still doesn't work for w2k clients I think... Work in progress..... (don't change). Jeremy.
* Correctly toggle the signing state to what it was previosly when sendingJeremy Allison2003-07-171-12/+5
| | | | | an oplock break. Jeremy.
* Putting the framework for server signing in place. Ensure we don't useJeremy Allison2003-07-171-5/+67
| | | | | sendfile when signing (I need to add this for readbraw/writebraw too...). Jeremy.
* Refactor signing code to remove most dependencies on 'struct cli'.Jeremy Allison2003-07-161-92/+113
| | | | | | | Ensure a server can't do a downgrade attack if client signing is mandatory. Add a lp_server_signing() function and a 'server signing' parameter that will act as the client one does. Jeremy
* Add API framework for server SMB signing.Jeremy Allison2003-07-161-0/+21
| | | | Jeremy.
* Add krb5_princ_component to Heimdal. Remove cli_ from mark packet signed.Jeremy Allison2003-07-161-5/+5
| | | | Jeremy.
* Spelling.Tim Potter2003-07-161-2/+2
|
* Added the "required" keyword to the "client signing" parameter to force itJeremy Allison2003-07-151-3/+2
| | | | | | on. Fail if missmatch. Small format tidyups in smbd/sesssetup.c. Preparing to add signing on server side. Jeremy.
* Add a cli_ prefix to a few functions to ensure everything that takes a ↵Jeremy Allison2003-07-151-10/+10
| | | | | | | struct cli_state is so marked. Jeremy
* Fix SMB signing when using NTLMSSP...Andrew Bartlett2003-07-141-91/+3
| | | | | | | | | | | It's so simple now I know how it works - and it has nothing to do with NTLMSSP (it's just a slightly different use of the old algorithm). :-). Note: This is actually less secure then the non-NTLMSSP code, as there is no per-session random data included for NTLM logins. (NTLMv2 is better, fortunetly). Andrew Bartlett
* Rework our smb signing code again, this factors out some of the commonAndrew Bartlett2003-06-081-54/+109
| | | | | | | | MAC calcuation code, and now supports multiple outstanding packets. Fixes bug #40 Andrew Bartlett
* spellingTim Potter2003-05-141-1/+1
|
* SMB Signing with NTLMv2 works!Andrew Bartlett2003-05-071-11/+2
| | | | | | | | | | | | | | | | | | (well, under certain conditions :-) There is no length limit on the size of the authentication response added into the MD5 hash. (We had previously limited this to lengths like 40, 44 or 64 in attempts to make sense of what the SNIA spec tells us). Instead, the entire authentication response is added in. Currently, this only works on a Win2k domain members with a Samba PDC, becouse our NTLMv2 code currently fails against an Win2k PDC. However, this splits the problem in half - particularly as the NTLMv2 format is known, and even has an ethereal disector! (thanks tpot). Andrew Bartlett
* Add doco to our SMB signing code.Andrew Bartlett2003-05-041-5/+32
| | | | | | | | This should make it clearer what magic numbers refer to the magic numbers in the CIFS spec, and what bits and peices are being appended into the MD5 calculation where. Andrew Bartlett
* Merge SMB signing, cli buffer clobber and NTLMSSP signing tweaks from HEAD.Andrew Bartlett2003-04-211-7/+8
|
* Merge a trivial fix across from HEAD. Not that thisVolker Lendecke2003-04-201-1/+1
| | | | | | would work now... Volker
* Merge from HEAD - leave the SMB buffer untouched when checking it's SMB sig.Andrew Bartlett2003-03-301-10/+26
| | | | Andrew Bartlett
* Removed unused var.Jeremy Allison2003-03-181-2/+0
| | | | Jeremy.
* We haven't implemented The Singing Contexts so far.Rafal Szczesniak2003-03-141-1/+1
| | | | | | | Who knows what .NET server brings, though ...? ;-) Rafal
* Further work on NTLMSSP-based SMB signing. Current status is that I cannnotAndrew Bartlett2003-03-101-30/+150
| | | | | | | | | | | | | | | | get Win2k to send a valid signiture in it's session setup reply - which it will give to win2k clients. So, I need to look at becoming 'more like MS', but for now I'll get this code into the tree. It's actually based on the TNG cli_pipe_ntlmssp.c, as it was slightly easier to understand than our own (but only the utility functions remain in any way intact...). This includes the mysical 'NTLM2' code - I have no idea if it actually works. (I couldn't get TNG to use it for its pipes either). Andrew Bartlett
* Try not to clobber the session request.Andrew Bartlett2003-03-091-3/+15
|
* Change the way we sign SMB packets, to a function pointer interface.Andrew Bartlett2003-03-091-0/+329
The intention is to allow for NTLMSSP and kerberos signing of packets, but for now it's just what I call 'simple' signing. (aka SMB signing per the SNIA spec) Andrew Bartlett