diff options
Diffstat (limited to 'fs/cifs/sess.c')
-rw-r--r-- | fs/cifs/sess.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 70d04d08293b..c652c73760dd 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c | |||
@@ -311,8 +311,10 @@ static int decode_unicode_ssetup(char **pbcc_area, int bleft, | |||
311 | kfree(ses->serverOS); | 311 | kfree(ses->serverOS); |
312 | /* UTF-8 string will not grow more than four times as big as UCS-16 */ | 312 | /* UTF-8 string will not grow more than four times as big as UCS-16 */ |
313 | ses->serverOS = kzalloc((4 * len) + 2 /* trailing null */, GFP_KERNEL); | 313 | ses->serverOS = kzalloc((4 * len) + 2 /* trailing null */, GFP_KERNEL); |
314 | if (ses->serverOS != NULL) | 314 | if (ses->serverOS != NULL) { |
315 | cifs_strfromUCS_le(ses->serverOS, (__le16 *)data, len, nls_cp); | 315 | cifs_strfromUCS_le(ses->serverOS, (__le16 *)data, len, nls_cp); |
316 | cFYI(1, ("serverOS=%s", ses->serverOS)); | ||
317 | } | ||
316 | data += 2 * (len + 1); | 318 | data += 2 * (len + 1); |
317 | words_left -= len + 1; | 319 | words_left -= len + 1; |
318 | 320 | ||
@@ -327,6 +329,7 @@ static int decode_unicode_ssetup(char **pbcc_area, int bleft, | |||
327 | if (ses->serverNOS != NULL) { | 329 | if (ses->serverNOS != NULL) { |
328 | cifs_strfromUCS_le(ses->serverNOS, (__le16 *)data, len, | 330 | cifs_strfromUCS_le(ses->serverNOS, (__le16 *)data, len, |
329 | nls_cp); | 331 | nls_cp); |
332 | cFYI(1, ("serverNOS=%s", ses->serverNOS)); | ||
330 | if (strncmp(ses->serverNOS, "NT LAN Manager 4", 16) == 0) { | 333 | if (strncmp(ses->serverNOS, "NT LAN Manager 4", 16) == 0) { |
331 | cFYI(1, ("NT4 server")); | 334 | cFYI(1, ("NT4 server")); |
332 | ses->flags |= CIFS_SES_NT4; | 335 | ses->flags |= CIFS_SES_NT4; |
@@ -343,9 +346,11 @@ static int decode_unicode_ssetup(char **pbcc_area, int bleft, | |||
343 | 346 | ||
344 | kfree(ses->serverDomain); | 347 | kfree(ses->serverDomain); |
345 | ses->serverDomain = kzalloc((4 * len) + 2, GFP_KERNEL); | 348 | ses->serverDomain = kzalloc((4 * len) + 2, GFP_KERNEL); |
346 | if (ses->serverDomain != NULL) | 349 | if (ses->serverDomain != NULL) { |
347 | cifs_strfromUCS_le(ses->serverDomain, (__le16 *)data, len, | 350 | cifs_strfromUCS_le(ses->serverDomain, (__le16 *)data, len, |
348 | nls_cp); | 351 | nls_cp); |
352 | cFYI(1, ("serverDomain=%s", ses->serverDomain)); | ||
353 | } | ||
349 | data += 2 * (len + 1); | 354 | data += 2 * (len + 1); |
350 | words_left -= len + 1; | 355 | words_left -= len + 1; |
351 | 356 | ||