diff options
author | Jeremy Allison <jra@samba.org> | 2006-06-26 23:36:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:18:57 -0500 |
commit | a24c4049670e6837705ac7013c7d2da596a95f6a (patch) | |
tree | 5f23b51c9eb11c39e777458996b4df7efc0b1a59 /source3/rpcclient/cmd_spoolss.c | |
parent | 6612988d09d78fc98b964456a10c4de9a4dfdb31 (diff) | |
download | samba-a24c4049670e6837705ac7013c7d2da596a95f6a.tar.gz samba-a24c4049670e6837705ac7013c7d2da596a95f6a.tar.bz2 samba-a24c4049670e6837705ac7013c7d2da596a95f6a.zip |
r16537: Fix for bug #3858, all files in a directory not
being deleted when hide unreadable set to true.
Here's the scoop.
This one is really interesting. The pattern of deleting a directory is to do a
findfirst to get the first part of the list, then for each name returned it
does a open/set delete on close/close -> thus deleting the file. Then it does a
findnext with the last file name THAT IT JUST DELETED ! Now we can handle this
in the findnext in the case where hide unreadable is set to false as we look
back in our cache of names and just seek to the right point. The bug is
actually fixed in the first hunk of this patch - the one that removes the
is_visible_file() check after SearchDir returns false. We don't actually need
it and in this case it's causing the delete to be aborted because it can't find
the name (doh ! it was just deleted). We don't need it as SearchDir is only
ever called from findnext, and findnext should only ever be returning names we
gave it.
The rest of the patch are the debugs I used to find
the problem but they're generically useful.
Phew - that one took a while to track down.....
Jerry, please merge for 3.0.23 final.
Jeremy.
(This used to be commit cd048cb775f0a8525fc19aa463db07c477521f5b)
Diffstat (limited to 'source3/rpcclient/cmd_spoolss.c')
0 files changed, 0 insertions, 0 deletions