• Alexander Viro's avatar
    [PATCH] cifs: assorted endianness bugfixes · 77615fa9
    Alexander Viro authored
            a) Flags2 left little-endian. SMBFLG2_... definitions switched to  
    cpu_to_le16(...), which kills the need of conversions in ->Flags2.
    	b) FILE_SYSTEM_UNIX_INFO (never used anywhere) is left little-endian;
    when users appear, they can convert themselves.
    	c) bugfix: in CIFSSessSetup() we used SecurityBlobLength of response
    without conversion.  That would screw bigendian clients with servers that
    give wcnt=4.
    	d) bugfix: in CIFSNTLMSSPNegotiateSessSetup() we use 
    SecurityBlob2->NegotiateFlags without conversion.  Again, problem on
    big-endian.
    	e) bugfix: SecurityBlob->MessageType is *not* host-endian.
    	f) bugfix: ->sendmsg() expects its last argument to be equal to sum
    of iovec lengths, so the value passed to kernel_sendmsg()/sock_sendmsg()
    would better be correct...
    Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.org.uk>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    77615fa9
cifssmb.c 102 KB