mirror of
https://github.com/samba-team/samba.git
synced 2025-12-11 08:23:49 +03:00
s3: libsmbclient: Ensure SMBC_getdents_ctx() also updates the readdirplus pointers.
If we are returning file entries, we have a duplicate list in dirplus. Update dirplus_next also so readdir and readdirplus are kept in sync. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14094 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
This commit is contained in:
@@ -1358,6 +1358,17 @@ SMBC_getdents_ctx(SMBCCTX *context,
|
||||
}
|
||||
|
||||
dir->dir_next = dirlist = dirlist -> next;
|
||||
|
||||
/*
|
||||
* If we are returning file entries, we
|
||||
* have a duplicate list in dirplus.
|
||||
*
|
||||
* Update dirplus_next also so readdir and
|
||||
* readdirplus are kept in sync.
|
||||
*/
|
||||
if (dir->dirplus_list != NULL) {
|
||||
dir->dirplus_next = dir->dirplus_next->next;
|
||||
}
|
||||
}
|
||||
|
||||
TALLOC_FREE(frame);
|
||||
|
||||
Reference in New Issue
Block a user