Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39561
b: refs/heads/master
c: 733f99a
h: refs/heads/master
i:
  39559: 3e8262b
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed Oct 15, 2006
1 parent afbab9c commit 0503636
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 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: 645408d1ffe9f27b176a88302c22420f301607db
refs/heads/master: 733f99acc82543030ce0417e2f2201ddc63097af
12 changes: 7 additions & 5 deletions trunk/fs/cifs/cifssmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
struct TCP_Server_Info * server;
u16 count;
unsigned int secFlags;
u16 dialect;

if(ses->server)
server = ses->server;
Expand Down Expand Up @@ -438,18 +439,19 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
if (rc != 0)
goto neg_err_exit;

cFYI(1,("Dialect: %d", pSMBr->DialectIndex));
dialect = le16_to_cpu(pSMBr->DialectIndex);
cFYI(1,("Dialect: %d", dialect));
/* Check wct = 1 error case */
if((pSMBr->hdr.WordCount < 13) || (pSMBr->DialectIndex == BAD_PROT)) {
if((pSMBr->hdr.WordCount < 13) || (dialect == BAD_PROT)) {
/* core returns wct = 1, but we do not ask for core - otherwise
small wct just comes when dialect index is -1 indicating we
could not negotiate a common dialect */
rc = -EOPNOTSUPP;
goto neg_err_exit;
#ifdef CONFIG_CIFS_WEAK_PW_HASH
} else if((pSMBr->hdr.WordCount == 13)
&& ((pSMBr->DialectIndex == LANMAN_PROT)
|| (pSMBr->DialectIndex == LANMAN2_PROT))) {
&& ((dialect == LANMAN_PROT)
|| (dialect == LANMAN2_PROT))) {
__s16 tmp;
struct lanman_neg_rsp * rsp = (struct lanman_neg_rsp *)pSMBr;

Expand Down Expand Up @@ -2943,7 +2945,7 @@ int SMBQueryInformation(const int xid, struct cifsTconInfo *tcon,
ts.tv_nsec = 0;
ts.tv_sec = time;
/* decode time fields */
pFinfo->ChangeTime = cifs_UnixTimeToNT(ts);
pFinfo->ChangeTime = cpu_to_le64(cifs_UnixTimeToNT(ts));
pFinfo->LastWriteTime = pFinfo->ChangeTime;
pFinfo->LastAccessTime = 0;
pFinfo->AllocationSize =
Expand Down

0 comments on commit 0503636

Please sign in to comment.