Bug 14094 - smbc_readdirplus() is incompatible with smbc_telldir() and smbc_lseekdir().
smbc_readdirplus() is incompatible with smbc_telldir() and smbc_lseekdir().
Status: RESOLVED FIXED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: libsmbclient
unspecified
All All
: P5 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-08-19 19:18 UTC by Jeremy Allison
Modified: 2019-09-20 09:46 UTC (History)
3 users (show)

See Also:


Attachments
git-am fix for master. (3.60 KB, patch)
2019-08-23 20:35 UTC, Jeremy Allison
no flags Details
git-am fix for master. (320 bytes, patch)
2019-08-26 18:26 UTC, Jeremy Allison
no flags Details
git-am fix for master (17.30 KB, patch)
2019-08-26 18:35 UTC, Jeremy Allison
no flags Details
git-am fix for 4.11, 4.10. (18.41 KB, patch)
2019-09-03 19:21 UTC, Jeremy Allison
no flags Details
git-am backport for 4.9.next. (17.59 KB, patch)
2019-09-03 20:05 UTC, Jeremy Allison
no flags Details
Updated git-am fix for 4.11, 4.10. (18.41 KB, patch)
2019-09-04 16:24 UTC, Jeremy Allison
jra: review? (slow)
asn: review+
Details
Updated git-am backport for 4.9.next. (17.59 KB, patch)
2019-09-04 16:46 UTC, Jeremy Allison
jra: review? (slow)
jra: review? (asn)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Allison 2019-08-19 19:18:25 UTC
From Anand K. Mistry <amistry@google.com>

> It's not possible to use telldir/seekdir to seek within a directory when
> using readdirplus. smbc_readdirplus() has the comment:
> "Works similar as smbc_readdir but returns more information about file."
> But doesn't mention this incompatibility.
Comment 1 Jeremy Allison 2019-08-23 18:51:35 UTC
I have a fix for this I'm working on. Can you test if I post it here ?

Thanks,

Jeremy.
Comment 2 Jeremy Allison 2019-08-23 20:35:35 UTC
Created attachment 15423 [details]
git-am fix for master.

Not yet complete, I need to add tests for this.
Comment 3 Jeremy Allison 2019-08-23 23:51:10 UTC
Comment on attachment 15423 [details]
git-am fix for master.

Patch is buggy. Please ignore for now (testing found the problem :-).
Comment 4 Jeremy Allison 2019-08-26 18:26:27 UTC
Created attachment 15430 [details]
git-am fix for master.

Includes new readdirplus_seek test showing all is consistent across all directory access methods.
Comment 5 Jeremy Allison 2019-08-26 18:35:22 UTC
Created attachment 15431 [details]
git-am fix for master
Comment 6 Jeremy Allison 2019-08-26 18:35:43 UTC
Comment on attachment 15431 [details]
git-am fix for master

Now with actual code included :-).
Comment 7 Jeremy Allison 2019-09-03 16:17:27 UTC
Reported (Anand K. Mistry <amistry@google.com>) reports that the patch fixes his use case. Pushed to master with Ralph's review. Once it's in I'll do the back-ports.
Comment 8 Jeremy Allison 2019-09-03 19:21:53 UTC
Created attachment 15453 [details]
git-am fix for 4.11, 4.10.

Cherry-pick from master. Applies cleanly to 4.11.rcNext, 4.10.next.
Comment 9 Jeremy Allison 2019-09-03 20:05:03 UTC
Created attachment 15454 [details]
git-am backport for 4.9.next.

Back-port for 4.9.next.
Comment 10 Jeremy Allison 2019-09-04 16:24:06 UTC
Created attachment 15458 [details]
Updated git-am fix for 4.11, 4.10.

Includes Volker's fix for the talloc return check error in the test code (now in autobuild).
Comment 11 Jeremy Allison 2019-09-04 16:46:19 UTC
Created attachment 15459 [details]
Updated git-am backport for 4.9.next.

Updated to include Volker's talloc check fix in the test code.
Comment 12 Andreas Schneider 2019-09-17 15:04:40 UTC
Looks good for me 4.9 is out of support now. Will there be a last release?
Comment 13 Jeremy Allison 2019-09-17 16:21:32 UTC
Re-assigning to Karolin for inclusion in whatever releases are still current :-).
Comment 14 Karolin Seeger 2019-09-18 08:41:54 UTC
(In reply to Andreas Schneider from comment #12)
Yes, there are a few fixes available and I think we should (as usual) ship a last 4.9 maintenance release. Samba 4.9.14 is scheduled for October 22.
Comment 15 Karolin Seeger 2019-09-18 08:45:47 UTC
Pushed to autobuild-v4-{11,10,9}-test.
Comment 16 Karolin Seeger 2019-09-20 09:46:59 UTC
(In reply to Karolin Seeger from comment #15)
Pushed to all branches.
Closing out bug report.

Thanks!