diff options
author | Steve French <sfrench@us.ibm.com> | 2006-09-30 00:13:17 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-09-30 00:13:17 -0400 |
commit | 9ac00b7d96045fa3ce573e0ad5cdc0350ad8e1d2 (patch) | |
tree | 80ee9890d64f6c4b899144df8ee0c6cd9361aafb /fs/cifs/cifsfs.c | |
parent | f46d3e11903e452924ef2996aa9aca2aae4427e2 (diff) |
[CIFS] Do not send newer QFSInfo to legacy servers which can not support it
Fix dialect negotiation to save off when we have negotiated lanman.
This allows us to avoid sending some somewhat newer requests that the server
can not handle and go directly to the older version (infolevel) of the same
call. Make sure we try to negotiate a level which allows us to get the
server OS (which we check so we can detect Win9x vs. other legacy servers
and eventually work around the Win9x DOS time bug (they reverse date/time
fields).
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index ca53720fa5b1..d6d226addde2 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -199,10 +199,12 @@ cifs_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
199 | /* Only need to call the old QFSInfo if failed | 199 | /* Only need to call the old QFSInfo if failed |
200 | on newer one */ | 200 | on newer one */ |
201 | if(rc) | 201 | if(rc) |
202 | rc = CIFSSMBQFSInfo(xid, pTcon, buf); | 202 | if((pTcon->ses->flags & CIFS_SES_LANMAN) == 0) |
203 | rc = CIFSSMBQFSInfo(xid, pTcon, buf); /* not supported by OS2 */ | ||
203 | 204 | ||
204 | /* Old Windows servers do not support level 103, retry with level | 205 | /* Some old Windows servers also do not support level 103, retry with |
205 | one if old server failed the previous call */ | 206 | older level one if old server failed the previous call or we |
207 | bypassed it because we detected that this was an older LANMAN sess */ | ||
206 | if(rc) | 208 | if(rc) |
207 | rc = SMBOldQFSInfo(xid, pTcon, buf); | 209 | rc = SMBOldQFSInfo(xid, pTcon, buf); |
208 | /* | 210 | /* |