From 2f5a1d2b1cfdbfc3d4c7c1e96d1ed061e7970f88 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 21 May 2008 14:26:38 +1000 Subject: Manually handle the NETLOGON_SAM_LOGON_REQUEST too. With the sid structure being both optional and aligned, it was too hard to do this in just IDL. This requried moving some things around, as otherwise we would have a dependency loop. Andrew Bartlett (This used to be commit e28790ba4884277f310be1b8bd3fba4fd47dbbdb) --- source4/librpc/idl/nbt.idl | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'source4/librpc/idl/nbt.idl') diff --git a/source4/librpc/idl/nbt.idl b/source4/librpc/idl/nbt.idl index b82c19ca0b..783f04eb42 100644 --- a/source4/librpc/idl/nbt.idl +++ b/source4/librpc/idl/nbt.idl @@ -10,7 +10,7 @@ import "misc.idl", "security.idl", "svcctl.idl", "samr.idl"; [ -helper("libcli/nbt/libnbt.h") + helper("libcli/netlogon.h", "libcli/nbt/libnbt.h") ] interface nbt { @@ -391,7 +391,9 @@ interface nbt typedef bitmap samr_AcctFlags samr_AcctFlags; - typedef struct { + /* query to dc hand marshaled, as it has 'optional' + * parts */ + typedef [nopull,nopush] struct { uint16 request_count; nstring computer_name; nstring user_name; @@ -400,9 +402,12 @@ interface nbt [value(ndr_size_dom_sid0(&sid, ndr->flags))] uint32 sid_size; /* The manual alignment is required because this * structure is marked flag(NDR_NOALIGN) via the - * nbt_netlogon_packet below */ - [flag(NDR_ALIGN4)] DATA_BLOB _pad; - [subcontext(0),subcontext_size(sid_size)] dom_sid0 sid; + * nbt_netlogon_packet below. + * + * However, both MUST only be present if sid_size > 0 + */ + [flag(NDR_ALIGN4)] DATA_BLOB _pad; + [subcontext(0),subcontext_size(sid_size)] dom_sid0 sid; netlogon_nt_version_flags nt_version; uint16 lmnt_token; uint16 lm20_token; -- cgit