Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ddaa683 authored by Steve French's avatar Steve French
Browse files

[CIFS] endian errors in lanman protocol support


	le16 compared to host-endian constant
	u8 fed to le32_to_cpu()
	le16 compared to host-endian constant

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent e466e487
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {
+1 −1
Original line number Diff line number Diff line
@@ -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));
	}
+1 −1
Original line number Diff line number Diff line
@@ -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 */