summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-02-04 14:03:20 +0100
committerKarolin Seeger <kseeger@samba.org>2010-02-24 16:25:09 +0100
commit98e8e6a58fe6f1fa1444ad89c06aa0d99a5639be (patch)
tree72315c4b17a89b3bc870e79d94a5ef4ba898c8db
parent00388e6b8776c4e54ca0d0b566a50a19e0f6d78f (diff)
downloadsamba-98e8e6a58fe6f1fa1444ad89c06aa0d99a5639be.tar.gz
samba-98e8e6a58fe6f1fa1444ad89c06aa0d99a5639be.tar.xz
samba-98e8e6a58fe6f1fa1444ad89c06aa0d99a5639be.zip
s3:libsmb: don't reuse the callers stype variable in cli_NetServerEnum()
When we need to do more than one network operation to get the browse list we need to use the same 'stype' value each time. metze (cherry picked from commit c2e4746fa9d68e7601e8e90cc0144d2e65a695b6) Signed-off-by: Stefan Metzmacher <metze@samba.org> Fix bug #7098 (smbclient -L gives wrong results with a large browse list). (cherry picked from commit f6484f7febd853122d4b91e52ee896d70686d9d2)
-rw-r--r--source/libsmb/clirap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/libsmb/clirap.c b/source/libsmb/clirap.c
index 61e2fb7f1a3..d248d0cdd1b 100644
--- a/source/libsmb/clirap.c
+++ b/source/libsmb/clirap.c
@@ -364,6 +364,7 @@ bool cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
const char *p1;
char *s1, *s2;
TALLOC_CTX *frame = talloc_stackframe();
+ uint32_t entry_stype;
if (p + 26 > rdata_end) {
TALLOC_FREE(frame);
@@ -387,7 +388,7 @@ bool cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
len++;
}
- stype = IVAL(p,18) & ~SV_TYPE_LOCAL_LIST_ONLY;
+ entry_stype = IVAL(p,18) & ~SV_TYPE_LOCAL_LIST_ONLY;
pull_string_talloc(frame,rdata,0,
&s1,sname,16,STR_ASCII);
@@ -399,7 +400,7 @@ bool cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
continue;
}
- fn(s1, stype, s2, state);
+ fn(s1, entry_stype, s2, state);
TALLOC_FREE(frame);
}