1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

netr_DatabaseSync() now works fully for databases 0, 1 and 2

This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent 360d03bb56
commit c4c09e9413
4 changed files with 5 additions and 4 deletions

View File

@ -309,7 +309,7 @@ sub ParseArrayPull($$$)
}
pidl "\t\t\treturn ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, \"Bad array size %u should be %u\", _array_size, $size);\n";
pidl "\t\t}\n";
if ($size =~ /r->/) {
if ($size =~ /r->in/) {
pidl "else { $size = _array_size; }\n";
}
pidl "\t}\n";

View File

@ -62,7 +62,7 @@ interface misc
} ULONG8;
/* this is also used in samr and netlogon */
typedef [public] struct {
typedef [public, flag(NDR_PAHEX)] struct {
uint32 units_per_week;
[size_is(1260), length_is(units_per_week/8)] uint8 *bitmap;
} samr_LogonHours;

View File

@ -445,7 +445,7 @@ interface netlogon
NTTIME auditretentionperiod;
bool8 auditingmode;
uint32 maxauditeventcount;
[size_is(maxauditeventcount)] uint32 *eventauditoptions;
[size_is(maxauditeventcount+1)] uint32 *eventauditoptions;
netr_String primarydomainname;
dom_sid2 *sid;
QUOTA_LIMITS quota_limits;
@ -485,6 +485,7 @@ interface netlogon
[size_is(privilege_entries)] uint32 *privilege_attrib;
[size_is(privilege_entries)] netr_String *privilege_name;
QUOTA_LIMITS quotalimits;
uint32 system_flags;
uint32 SecurityInformation;
sec_desc_buf sdbuf;
netr_String unknown1;

View File

@ -258,11 +258,11 @@ static BOOL test_DatabaseSync(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
r.in.logonserver = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p));
r.in.computername = lp_netbios_name();
r.in.sync_context = 0;
r.in.preferredmaximumlength = (uint32)-1;
ZERO_STRUCT(r.in.return_authenticator);
for (i=0;i<ARRAY_SIZE(database_ids);i++) {
r.in.sync_context = 0;
r.in.database_id = database_ids[i];
printf("Testing DatabaseSync of id %d\n", r.in.database_id);