summaryrefslogtreecommitdiffstats
path: root/source/rpc_parse
diff options
context:
space:
mode:
authorJean-François Micouleau <jfm@samba.org>2001-12-21 22:34:49 +0000
committerJean-François Micouleau <jfm@samba.org>2001-12-21 22:34:49 +0000
commitc0178e1a03f8225e5b350feb8fcbfb02f43327b4 (patch)
treeaf4d9de71a3d14239e87e0c5019d346b80a102c4 /source/rpc_parse
parentbf65331cb49299189d35ad5834167ec24b3a1ecb (diff)
downloadsamba-c0178e1a03f8225e5b350feb8fcbfb02f43327b4.tar.gz
samba-c0178e1a03f8225e5b350feb8fcbfb02f43327b4.tar.xz
samba-c0178e1a03f8225e5b350feb8fcbfb02f43327b4.zip
doesn't keep track of the struct's size we enumerate. W2K doesn't
calculate them and always reply a size of 32 bytes whereas NT4 did the maths. Anyway, it looks like the clients don't complain. in query_dom_info() at level 2, return the real number of users and groups. That's the fix to the W95/98 userlist bug ! as W95/98 does a query_dom_info(2) followed by a query_disp_info(4) on the SAME context handle (err we call it an lsa policy handle ! plain wrong name), I was tempted to keep the snapshoot in memory, to prevent 2 full user db enumerations in a row and just have one shared. But if some client does the 2 calls on two different handles, we would have 2 copies in memory not free'ed before the samr_close(). We still have too many fixed constant and too many magic values in that code. And btw, I really hates how the sequence number is generated ! J.F.
Diffstat (limited to 'source/rpc_parse')
-rw-r--r--source/rpc_parse/parse_samr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/rpc_parse/parse_samr.c b/source/rpc_parse/parse_samr.c
index fdc2d560e15..10640b0c766 100644
--- a/source/rpc_parse/parse_samr.c
+++ b/source/rpc_parse/parse_samr.c
@@ -632,7 +632,7 @@ inits a structure.
********************************************************************/
void init_unk_info2(SAM_UNK_INFO_2 * u_2,
char *domain, char *server,
- uint32 seq_num)
+ uint32 seq_num, uint32 num_users, uint32 num_groups, uint32 num_alias)
{
int len_domain = strlen(domain);
int len_server = strlen(server);
@@ -651,9 +651,9 @@ void init_unk_info2(SAM_UNK_INFO_2 * u_2,
u_2->unknown_4 = 0x00000001;
u_2->unknown_5 = 0x00000003;
u_2->unknown_6 = 0x00000001;
- u_2->num_domain_usrs = MAX_SAM_ENTRIES;
- u_2->num_domain_grps = MAX_SAM_ENTRIES;
- u_2->num_local_grps = MAX_SAM_ENTRIES;
+ u_2->num_domain_usrs = num_users;
+ u_2->num_domain_grps = num_groups;
+ u_2->num_local_grps = num_alias;
memset(u_2->padding, 0, sizeof(u_2->padding)); /* 12 bytes zeros */