Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40858
b: refs/heads/master
c: 6e659c6
h: refs/heads/master
v: v3
  • Loading branch information
Steve French committed Nov 8, 2006
1 parent 7a2ab2a commit 3c6f7dd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5fe14c851efedf95b0e7652a3a7b93ec899d1599
refs/heads/master: 6e659c63998881e8f4a842edbe86ac8c5cdaee41
23 changes: 13 additions & 10 deletions trunk/fs/cifs/sess.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,23 @@ static void unicode_ssetup_strings(char ** pbcc_area, struct cifsSesInfo *ses,
} */
/* copy user */
if(ses->userName == NULL) {
/* BB what about null user mounts - check that we do this BB */
/* null user mount */
*bcc_ptr = 0;
*(bcc_ptr+1) = 0;
} else { /* 300 should be long enough for any conceivable user name */
bytes_ret = cifs_strtoUCS((__le16 *) bcc_ptr, ses->userName,
300, nls_cp);
}
bcc_ptr += 2 * bytes_ret;
bcc_ptr += 2; /* account for null termination */
/* copy domain */
if(ses->domainName == NULL)
bytes_ret = cifs_strtoUCS((__le16 *) bcc_ptr,
"CIFS_LINUX_DOM", 32, nls_cp);
else
if(ses->domainName == NULL) {
/* Sending null domain better than using a bogus domain name (as
we did briefly in 2.6.18) since server will use its default */
*bcc_ptr = 0;
*(bcc_ptr+1) = 0;
bytes_ret = 0;
} else
bytes_ret = cifs_strtoUCS((__le16 *) bcc_ptr, ses->domainName,
256, nls_cp);
bcc_ptr += 2 * bytes_ret;
Expand Down Expand Up @@ -144,13 +149,11 @@ static void ascii_ssetup_strings(char ** pbcc_area, struct cifsSesInfo *ses,

/* copy domain */

if(ses->domainName == NULL) {
strcpy(bcc_ptr, "CIFS_LINUX_DOM");
bcc_ptr += 14; /* strlen(CIFS_LINUX_DOM) */
} else {
if(ses->domainName != NULL) {
strncpy(bcc_ptr, ses->domainName, 256);
bcc_ptr += strnlen(ses->domainName, 256);
}
} /* else we will send a null domain name
so the server will default to its own domain */
*bcc_ptr = 0;
bcc_ptr++;

Expand Down

0 comments on commit 3c6f7dd

Please sign in to comment.