From c4c09e9413d3886e030e98739121bbae81f80ca5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Dec 2003 04:59:18 +0000 Subject: [PATCH] netr_DatabaseSync() now works fully for databases 0, 1 and 2 --- source/build/pidl/parser.pm | 2 +- source/librpc/idl/misc.idl | 2 +- source/librpc/idl/netlogon.idl | 3 ++- source/torture/rpc/netlogon.c | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source/build/pidl/parser.pm b/source/build/pidl/parser.pm index 1ba1a57cab4..02fc40f33f9 100644 --- a/source/build/pidl/parser.pm +++ b/source/build/pidl/parser.pm @@ -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"; diff --git a/source/librpc/idl/misc.idl b/source/librpc/idl/misc.idl index d974b5465cb..eb2288bc353 100644 --- a/source/librpc/idl/misc.idl +++ b/source/librpc/idl/misc.idl @@ -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; diff --git a/source/librpc/idl/netlogon.idl b/source/librpc/idl/netlogon.idl index 7e15102043b..9214d0505b0 100644 --- a/source/librpc/idl/netlogon.idl +++ b/source/librpc/idl/netlogon.idl @@ -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; diff --git a/source/torture/rpc/netlogon.c b/source/torture/rpc/netlogon.c index d8bacac87ce..f9d0ad44635 100644 --- a/source/torture/rpc/netlogon.c +++ b/source/torture/rpc/netlogon.c @@ -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