diff options
author | bp <bp@FreeBSD.org> | 2005-11-22 07:13:00 +0000 |
---|---|---|
committer | bp <bp@FreeBSD.org> | 2005-11-22 07:13:00 +0000 |
commit | 4248fbe6a676ccb686b8beaab641dd77db767c3b (patch) | |
tree | f1f23ff11a12eaf535ee4a5f9f1645eadff4da3b /sys/fs/smbfs | |
parent | 3db092e2baccaa2eb0e8f9f1c8d7d7e812d081e3 (diff) | |
download | FreeBSD-src-4248fbe6a676ccb686b8beaab641dd77db767c3b.zip FreeBSD-src-4248fbe6a676ccb686b8beaab641dd77db767c3b.tar.gz |
Fix interaction with Windows 2000/XP based servers:
If the complete reply on the TRANS2_FIND_FIRST2 request fits exactly
into one responce packet, then next call to TRANS2_FIND_NEXT2 will return
zero entries and server will close current transaction. To avoid
subsequent errors we should not perform FIND_CLOSE2 request.
PR: kern/78953
Submitted by: Jim Carroll
Diffstat (limited to 'sys/fs/smbfs')
-rw-r--r-- | sys/fs/smbfs/smbfs_smb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/fs/smbfs/smbfs_smb.c b/sys/fs/smbfs/smbfs_smb.c index f45d2ac..61129bd 100644 --- a/sys/fs/smbfs/smbfs_smb.c +++ b/sys/fs/smbfs/smbfs_smb.c @@ -1224,8 +1224,10 @@ smbfs_smb_trans2find2(struct smbfs_fctx *ctx) return error; if ((error = md_get_uint16le(mdp, &tw)) != 0) return error; - if (ctx->f_ecnt == 0) + if (ctx->f_ecnt == 0) { + ctx->f_flags |= SMBFS_RDD_EOF | SMBFS_RDD_NOCLOSE; return ENOENT; + } ctx->f_rnameofs = tw; mdp = &t2p->t2_rdata; if (mdp->md_top == NULL) { |