summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-01-29 21:22:08 +0000
committerLuke Leighton <lkcl@samba.org>1999-01-29 21:22:08 +0000
commit9b5043cb2f125c39eda1e986cfcce3b534dc3b43 (patch)
tree8c23428f5f8cba9d6108a2e7a39edb68d93e47f8 /source3/rpcclient
parent5a9859c7b0e1d22cd92b3a512690c5113c1bd51b (diff)
downloadsamba-9b5043cb2f125c39eda1e986cfcce3b534dc3b43.tar.gz
samba-9b5043cb2f125c39eda1e986cfcce3b534dc3b43.tar.bz2
samba-9b5043cb2f125c39eda1e986cfcce3b534dc3b43.zip
fix for enumerate domain users (bug spotted by sean matthews).
also needed to use start index properly and generate next index. both client and server code need to recognise error code 0x105 when there's not enough room to store all the users in one call. sort this out another time. (This used to be commit ad58cdfac6b85d9431216e32e532ad4d60f9c6dd)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_samr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c
index 8a43a69cb7..18018659b9 100644
--- a/source3/rpcclient/cmd_samr.c
+++ b/source3/rpcclient/cmd_samr.c
@@ -1034,7 +1034,7 @@ void cmd_sam_enum_users(struct client_info *info)
BOOL request_user_info = False;
BOOL request_group_info = False;
BOOL request_alias_info = False;
- uint16 num_entries = 0;
+ uint16 start_idx = 0x0;
uint16 unk_0 = 0x0;
uint16 acb_mask = 0;
uint16 unk_1 = 0x0;
@@ -1075,7 +1075,7 @@ void cmd_sam_enum_users(struct client_info *info)
#ifdef DEBUG_TESTING
if (next_token(NULL, tmp, NULL, sizeof(tmp)))
{
- num_entries = (uint16)strtol(tmp, (char**)NULL, 16);
+ start_idx = (uint32)strtol(tmp, (char**)NULL, 10);
}
if (next_token(NULL, tmp, NULL, sizeof(tmp)))
@@ -1102,7 +1102,7 @@ void cmd_sam_enum_users(struct client_info *info)
#ifdef DEBUG_TESTING
DEBUG(5,("Number of entries:%d unk_0:%04x acb_mask:%04x unk_1:%04x\n",
- num_entries, unk_0, acb_mask, unk_1));
+ start_idx, unk_0, acb_mask, unk_1));
#endif
/* open SAMR session. negotiate credentials */
@@ -1127,9 +1127,9 @@ void cmd_sam_enum_users(struct client_info *info)
/* read some users */
res = res ? samr_enum_dom_users(smb_cli, fnum,
- &info->dom.samr_pol_open_domain,
- num_entries, unk_0, acb_mask, unk_1, 0xffff,
- &info->dom.sam, &info->dom.num_sam_entries) : False;
+ &info->dom.samr_pol_open_domain,
+ start_idx, acb_mask, unk_1, 0x80,
+ &info->dom.sam, &info->dom.num_sam_entries) : False;
if (res && info->dom.num_sam_entries == 0)
{