]> err.no Git - linux-2.6/commitdiff
[CIFS] endian errors in lanman protocol support
authorSteve French <sfrench@us.ibm.com>
Tue, 15 Aug 2006 13:35:48 +0000 (13:35 +0000)
committerSteve French <sfrench@us.ibm.com>
Tue, 15 Aug 2006 13:35:48 +0000 (13:35 +0000)
le16 compared to host-endian constant
u8 fed to le32_to_cpu()
le16 compared to host-endian constant

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/cifssmb.c
fs/cifs/readdir.c
fs/cifs/sess.c

index dcbc3e075e812770037adc1d08dddf08057e608d..075d8fb3d37608a96d0610c519794388351d1173 100644 (file)
@@ -477,7 +477,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
                /* BB get server time for time conversions and add
                code to use it and timezone since this is not UTC */    
 
-               if (rsp->EncryptionKeyLength == CIFS_CRYPTO_KEY_SIZE) {
+               if (rsp->EncryptionKeyLength == cpu_to_le16(CIFS_CRYPTO_KEY_SIZE)) {
                        memcpy(server->cryptKey, rsp->EncryptionKey,
                                CIFS_CRYPTO_KEY_SIZE);
                } else if (server->secMode & SECMODE_PW_ENCRYPT) {
index 03bbcb3779136b1546da05e4d5de0367b0d43d23..105761e3ba0ea8277da8c95c5ccb28ca06446389 100644 (file)
@@ -556,7 +556,7 @@ static int cifs_entry_is_dot(char *current_entry, struct cifsFileInfo *cfile)
                FIND_FILE_STANDARD_INFO * pFindData =
                        (FIND_FILE_STANDARD_INFO *)current_entry;
                filename = &pFindData->FileName[0];
-               len = le32_to_cpu(pFindData->FileNameLength);
+               len = pFindData->FileNameLength;
        } else {
                cFYI(1,("Unknown findfirst level %d",cfile->srch_inf.info_level));
        }
index 7202d534ef0bde1d4bcea1d3f61f47bec74f6533..d1705ab8136e1fc53768240d6dbca66bfcb56132 100644 (file)
@@ -372,7 +372,7 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
 
                /* no capabilities flags in old lanman negotiation */
 
-               pSMB->old_req.PasswordLength = CIFS_SESS_KEY_SIZE
+               pSMB->old_req.PasswordLength = cpu_to_le16(CIFS_SESS_KEY_SIZE)
                /* BB calculate hash with password */
                /* and copy into bcc */