The Samba-Bugzilla – Attachment 4913 Details for
Bug 6867
trans2findnext returns reply_nterror(req, ntstatus) In a directory with a lot of files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am format patch for 3.4.4.
0001-Fix-bug-6867-trans2findnext-returns-reply_nterror.patch (text/plain), 2.93 KB, created by
Jeremy Allison
on 2009-11-02 15:05:11 UTC
(
hide
)
Description:
git-am format patch for 3.4.4.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2009-11-02 15:05:11 UTC
Size:
2.93 KB
patch
obsolete
>From 4bc097a9020afdad7592116afc7a2f41c348ba22 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Mon, 2 Nov 2009 12:53:46 -0800 >Subject: [PATCH] Fix bug 6867 - trans2findnext returns reply_nterror(req, ntstatus) In a directory with a lot of files. > Jeremy. > >--- > source3/smbd/trans2.c | 28 ++++++++++++++++------------ > 1 files changed, 16 insertions(+), 12 deletions(-) > >diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c >index 60924df..bf3808e 100644 >--- a/source3/smbd/trans2.c >+++ b/source3/smbd/trans2.c >@@ -2263,23 +2263,26 @@ static void call_trans2findnext(connection_struct *conn, > requires_resume_key = (findnext_flags & FLAG_TRANS2_FIND_REQUIRE_RESUME); > continue_bit = (findnext_flags & FLAG_TRANS2_FIND_CONTINUE); > >- srvstr_get_path_wcard(ctx, params, req->flags2, &resume_name, >+ if (!continue_bit) { >+ /* We only need resume_name if continue_bit is zero. */ >+ srvstr_get_path_wcard(ctx, params, req->flags2, &resume_name, > params+12, > total_params - 12, STR_TERMINATE, &ntstatus, > &mask_contains_wcard); >- if (!NT_STATUS_IS_OK(ntstatus)) { >- /* Win9x or OS/2 can send a resume name of ".." or ".". This will cause the parser to >- complain (it thinks we're asking for the directory above the shared >- path or an invalid name). Catch this as the resume name is only compared, never used in >- a file access. JRA. */ >- srvstr_pull_talloc(ctx, params, req->flags2, >+ if (!NT_STATUS_IS_OK(ntstatus)) { >+ /* Win9x or OS/2 can send a resume name of ".." or ".". This will cause the parser to >+ complain (it thinks we're asking for the directory above the shared >+ path or an invalid name). Catch this as the resume name is only compared, never used in >+ a file access. JRA. */ >+ srvstr_pull_talloc(ctx, params, req->flags2, > &resume_name, params+12, > total_params - 12, > STR_TERMINATE); > >- if (!resume_name || !(ISDOT(resume_name) || ISDOTDOT(resume_name))) { >- reply_nterror(req, ntstatus); >- return; >+ if (!resume_name || !(ISDOT(resume_name) || ISDOTDOT(resume_name))) { >+ reply_nterror(req, ntstatus); >+ return; >+ } > } > } > >@@ -2287,7 +2290,8 @@ static void call_trans2findnext(connection_struct *conn, > close_after_request=%d, close_if_end = %d requires_resume_key = %d \ > resume_key = %d resume name = %s continue=%d level = %d\n", > dptr_num, max_data_bytes, maxentries, close_after_request, close_if_end, >- requires_resume_key, resume_key, resume_name, continue_bit, info_level)); >+ requires_resume_key, resume_key, >+ resume_name ? resume_name : "(NULL)", continue_bit, info_level)); > > if (!maxentries) { > /* W2K3 seems to treat zero as 1. */ >@@ -2412,7 +2416,7 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd > * depend on the last file name instead. > */ > >- if(*resume_name && !continue_bit) { >+ if(!continue_bit && resume_name && *resume_name) { > SMB_STRUCT_STAT st; > > long current_pos = 0; >-- >1.5.4.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
vl
:
review+
Actions:
View
Attachments on
bug 6867
: 4913 |
4914