summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-06-01 00:00:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:57:04 -0500
commit0100bb0eb697105db7ef1473455a8b180ca43cb4 (patch)
tree18fd41c9a9eca446ab62d5c19292df79b34b6059
parent38c5136ce16ca1f61a0d64a89269ccc556d1d7ea (diff)
downloadsamba-0100bb0eb697105db7ef1473455a8b180ca43cb4.tar.gz
samba-0100bb0eb697105db7ef1473455a8b180ca43cb4.tar.bz2
samba-0100bb0eb697105db7ef1473455a8b180ca43cb4.zip
r7157: Ensure we abort a directory listing if we see the same
name twice between packets. Jeremy. (This used to be commit f9063b383ed2c53841ac27691b6a593b80c20b12)
-rw-r--r--source3/libsmb/clilist.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index a1434338c9..d9a6f4709d 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -313,6 +313,13 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
}
p2 += interpret_long_filename(cli,info_level,p2,&finfo,
&resume_key,&last_name_raw,&last_name_raw_len);
+
+ if (!First && *mask && strcsequal(finfo.name, mask)) {
+ DEBUG(0,("Error: Looping in FIND_NEXT as name %s has already been seen?\n",
+ finfo.name));
+ ff_eos = 1;
+ break;
+ }
}
if (ff_lastname > 0) {