Skip to content

Commit 3782218

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: Eliminate sparse warning - bad constant expression cifs: check for NULL session password missing changes during ntlmv2/ntlmssp auth and sign [CIFS] Fix ntlmv2 auth with ntlmssp cifs: correction of unicode header files cifs: fix NULL pointer dereference in cifs_find_smb_ses cifs: consolidate error handling in several functions cifs: clean up error handling in cifs_mknod
2 parents 5a55905 + 2d20ca8 commit 3782218

File tree

15 files changed

+622
-279
lines changed

15 files changed

+622
-279
lines changed

fs/cifs/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ config CIFS
22
tristate "CIFS support (advanced network filesystem, SMBFS successor)"
33
depends on INET
44
select NLS
5+
select CRYPTO_MD5
6+
select CRYPTO_ARC4
57
help
68
This is the client VFS module for the Common Internet File System
79
(CIFS) protocol which is the successor to the Server Message Block

fs/cifs/asn1.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -597,13 +597,13 @@ decode_negTokenInit(unsigned char *security_blob, int length,
597597
if (compare_oid(oid, oidlen, MSKRB5_OID,
598598
MSKRB5_OID_LEN))
599599
server->sec_mskerberos = true;
600-
else if (compare_oid(oid, oidlen, KRB5U2U_OID,
600+
if (compare_oid(oid, oidlen, KRB5U2U_OID,
601601
KRB5U2U_OID_LEN))
602602
server->sec_kerberosu2u = true;
603-
else if (compare_oid(oid, oidlen, KRB5_OID,
603+
if (compare_oid(oid, oidlen, KRB5_OID,
604604
KRB5_OID_LEN))
605605
server->sec_kerberos = true;
606-
else if (compare_oid(oid, oidlen, NTLMSSP_OID,
606+
if (compare_oid(oid, oidlen, NTLMSSP_OID,
607607
NTLMSSP_OID_LEN))
608608
server->sec_ntlmssp = true;
609609

fs/cifs/cifs_unicode.h

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
* This is a compressed table of upper and lower case conversion.
3131
*
3232
*/
33+
#ifndef _CIFS_UNICODE_H
34+
#define _CIFS_UNICODE_H
3335

3436
#include <asm/byteorder.h>
3537
#include <linux/types.h>
@@ -67,8 +69,8 @@ extern const struct UniCaseRange CifsUniUpperRange[];
6769
#endif /* UNIUPR_NOUPPER */
6870

6971
#ifndef UNIUPR_NOLOWER
70-
extern signed char UniLowerTable[512];
71-
extern struct UniCaseRange UniLowerRange[];
72+
extern signed char CifsUniLowerTable[512];
73+
extern const struct UniCaseRange CifsUniLowerRange[];
7274
#endif /* UNIUPR_NOLOWER */
7375

7476
#ifdef __KERNEL__
@@ -337,15 +339,15 @@ UniStrupr(register wchar_t *upin)
337339
* UniTolower: Convert a unicode character to lower case
338340
*/
339341
static inline wchar_t
340-
UniTolower(wchar_t uc)
342+
UniTolower(register wchar_t uc)
341343
{
342-
register struct UniCaseRange *rp;
344+
register const struct UniCaseRange *rp;
343345

344-
if (uc < sizeof(UniLowerTable)) {
346+
if (uc < sizeof(CifsUniLowerTable)) {
345347
/* Latin characters */
346-
return uc + UniLowerTable[uc]; /* Use base tables */
348+
return uc + CifsUniLowerTable[uc]; /* Use base tables */
347349
} else {
348-
rp = UniLowerRange; /* Use range tables */
350+
rp = CifsUniLowerRange; /* Use range tables */
349351
while (rp->start) {
350352
if (uc < rp->start) /* Before start of range */
351353
return uc; /* Uppercase = input */
@@ -374,3 +376,5 @@ UniStrlwr(register wchar_t *upin)
374376
}
375377

376378
#endif
379+
380+
#endif /* _CIFS_UNICODE_H */

fs/cifs/cifs_uniupr.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ const struct UniCaseRange CifsUniUpperRange[] = {
140140
/*
141141
* Latin lower case
142142
*/
143-
static signed char CifsUniLowerTable[512] = {
143+
signed char CifsUniLowerTable[512] = {
144144
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 000-00f */
145145
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 010-01f */
146146
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 020-02f */
@@ -242,12 +242,12 @@ static signed char UniCaseRangeLff20[27] = {
242242
/*
243243
* Lower Case Range
244244
*/
245-
static const struct UniCaseRange CifsUniLowerRange[] = {
246-
0x0380, 0x03ab, UniCaseRangeL0380,
247-
0x0400, 0x042f, UniCaseRangeL0400,
248-
0x0490, 0x04cb, UniCaseRangeL0490,
249-
0x1e00, 0x1ff7, UniCaseRangeL1e00,
250-
0xff20, 0xff3a, UniCaseRangeLff20,
251-
0, 0, 0
245+
const struct UniCaseRange CifsUniLowerRange[] = {
246+
{0x0380, 0x03ab, UniCaseRangeL0380},
247+
{0x0400, 0x042f, UniCaseRangeL0400},
248+
{0x0490, 0x04cb, UniCaseRangeL0490},
249+
{0x1e00, 0x1ff7, UniCaseRangeL1e00},
250+
{0xff20, 0xff3a, UniCaseRangeLff20},
251+
{0}
252252
};
253253
#endif

0 commit comments

Comments
 (0)