[Samba] File copying under WIN98
Jeremy Allison
jra at samba.org
Mon Mar 21 18:11:31 GMT 2005
On Mon, Mar 21, 2005 at 02:01:17PM +0100, Jens Wulf wrote:
> with the Samba3.0.12 release i encountered the following problem :
> when i try to copy a file from a samba share to the local disk then the
> process hangs with the windows-message
> "Preparing to copy" (my translation from the german message).
> In a WIN98-DOS-Windows the copy command hangs too, but the file is created.
> The copying from my WIN-XP HOME works.
> My previous installed version 3.0.9 worked fine with the same configuration
> (smb.conf)
>
> does anyone have this problem too - and maybe a solution except
> reinstalling old samba ?
Ok, I screwed up bigtime :-(. This one is my fault. I've attached my
proposed patch but more testing would be welcome.
We'll probably have to do a brown-paper-bag 3.0.13 over this one :-(.
Sorry.
Jeremy.
-------------- next part --------------
Index: smbd/dir.c
===================================================================
--- smbd/dir.c (revision 5921)
+++ smbd/dir.c (working copy)
@@ -595,6 +595,13 @@
BOOL dptr_SearchDir(struct dptr_struct *dptr, const char *name, long *poffset, SMB_STRUCT_STAT *pst)
{
ZERO_STRUCTP(pst);
+
+ if (!dptr->has_wild && (dptr->dir_hnd->offset == -1)) {
+ /* This is a singleton directory and we're already at the end. */
+ *poffset = -1;
+ return False;
+ }
+
while (SearchDir(dptr->dir_hnd, name, poffset) == True) {
if (is_visible_file(dptr->conn, dptr->path, name, pst, True)) {
return True;
More information about the samba
mailing list