[PATCH CIFS] use CryptoAPI MD4/MD5

Erlend Aasland erlend-a at ux.his.no
Wed Oct 1 23:26:50 GMT 2003


On 10/01/03 14:55, Matt Mackall wrote:
> On Wed, Oct 01, 2003 at 03:30:39PM +0200, Erlend Aasland wrote:
> >  static int cifs_calculate_signature(const struct smb_hdr * cifs_pdu, const char * key, char * signature)
> [...]
> Eek. How often does this get called?
It is (normally) called twice in SendReceive(). SendReceive() is called
very often in cifs. After a quick look at cifs, it seems that most of
these calls are protected with a per connection-lock (correct me if I'm
wrong). But since two connections can call SendReceive() at the same
time, we have to protect the tfm with locks. Correct?

Would a better solution be to allocate one tfm per connection, thus
no need to protect the tfm with a dedicated lock, right?

[Or is converting cifs to the cryptoapi is waste of time? (I hope not :-) ]

Regards
	Erlend Aasland



More information about the samba-technical mailing list