From d49f94621bd1d18437d5846d61b84054f35d39e4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 16 Apr 2008 17:21:48 +0200 Subject: Provide stubs when the [todo] attribute is set. (This used to be commit 356a5d24747bb5e1ef9774c690a5ec386a4a165e) --- source4/librpc/idl/policyagent.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/librpc/idl') diff --git a/source4/librpc/idl/policyagent.idl b/source4/librpc/idl/policyagent.idl index 295b70a2a1..ab137faf27 100644 --- a/source4/librpc/idl/policyagent.idl +++ b/source4/librpc/idl/policyagent.idl @@ -9,5 +9,5 @@ { /*****************/ /* Function 0x00 */ - WERROR policyagent_Dummy(); + [todo] WERROR policyagent_Dummy(); } -- cgit From c47286e57a80b731a4e7d938572f3b6f0a0a6c57 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 16 Apr 2008 18:11:37 +0200 Subject: Fix todo element on actually implemented function. (This used to be commit dedbeea4d28ae10a15766e38e59593a2799183f3) --- source4/librpc/idl/drsuapi.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/librpc/idl') diff --git a/source4/librpc/idl/drsuapi.idl b/source4/librpc/idl/drsuapi.idl index 9652571668..2f48287233 100644 --- a/source4/librpc/idl/drsuapi.idl +++ b/source4/librpc/idl/drsuapi.idl @@ -849,7 +849,7 @@ interface drsuapi [case(1)] drsuapi_DsNameCtr1 *ctr1; } drsuapi_DsNameCtr; - [todo] WERROR drsuapi_DsCrackNames( + WERROR drsuapi_DsCrackNames( [in] policy_handle *bind_handle, [in, out] int32 level, [in,switch_is(level)] drsuapi_DsNameRequest req, -- cgit From aa51981e9916bf8d145001e4ad592efd53527dfe Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 17 Apr 2008 15:01:45 +0200 Subject: libndr: add dom_sid0 type that can later be used for CLDAP and MAILSLOT ntlogon packets metze (This used to be commit 690c12cd2afd0fba626576fbae3f28ffdae63be2) --- source4/librpc/idl/security.idl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/librpc/idl') diff --git a/source4/librpc/idl/security.idl b/source4/librpc/idl/security.idl index 753fad85cf..314846c53f 100644 --- a/source4/librpc/idl/security.idl +++ b/source4/librpc/idl/security.idl @@ -22,6 +22,9 @@ cpp_quote("#define dom_sid2 dom_sid") /* same struct as dom_sid but inside a 28 bytes fixed buffer in NDR */ cpp_quote("#define dom_sid28 dom_sid") +/* same struct as dom_sid but in a variable byte buffer, which is maybe empty in NDR */ +cpp_quote("#define dom_sid0 dom_sid") + [ pointer_default(unique) ] -- cgit From e0fe8613a3621e7a1e0488f6698db56ef6c67dd9 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 17 Apr 2008 16:26:59 +0200 Subject: nbt.idl: fix parsing und pushing of dom_sids by using dom_sid0 metze (This used to be commit 0e2f6d481b3e35ed392b2b3340b244c77593819c) --- source4/librpc/idl/nbt.idl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'source4/librpc/idl') diff --git a/source4/librpc/idl/nbt.idl b/source4/librpc/idl/nbt.idl index aa88360882..dddfa4e1ce 100644 --- a/source4/librpc/idl/nbt.idl +++ b/source4/librpc/idl/nbt.idl @@ -440,9 +440,8 @@ interface nbt nstring unicode_domain; uint32 db_count; nbt_db_change dbchange[db_count]; - [value(ndr_size_dom_sid(&sid, ndr->flags))] uint32 sid_size; - [flag(NDR_ALIGN4)] DATA_BLOB _pad2; - dom_sid sid; + [value(ndr_size_dom_sid0(&sid, ndr->flags))] uint32 sid_size; + [subcontext(0),subcontext_size(sid_size)] dom_sid0 sid; uint32 nt_version; uint16 lmnt_token; uint16 lm20_token; @@ -560,9 +559,8 @@ interface nbt nstring user_name; astring mailslot_name; uint32 acct_control; - [value(ndr_size_dom_sid(&sid, ndr->flags))] uint32 sid_size; - [flag(NDR_ALIGN4)] DATA_BLOB _pad; - dom_sid sid; + [value(ndr_size_dom_sid0(&sid, ndr->flags))] uint32 sid_size; + [subcontext(0),subcontext_size(sid_size)] dom_sid0 sid; uint32 nt_version; uint16 lmnt_token; uint16 lm20_token; -- cgit From 54efc107e58ed1eed7109ea08fdf808e3a15327b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 22 Apr 2008 01:34:11 +0200 Subject: Add port number for ncacn_http epmapper. (This used to be commit 1304362b3754960f68fb56e0915c3d80cace6e60) --- source4/librpc/idl/epmapper.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/librpc/idl') diff --git a/source4/librpc/idl/epmapper.idl b/source4/librpc/idl/epmapper.idl index ea04878094..89cea57ea5 100644 --- a/source4/librpc/idl/epmapper.idl +++ b/source4/librpc/idl/epmapper.idl @@ -15,7 +15,7 @@ import "misc.idl"; uuid("e1af8308-5d1f-11c9-91a4-08002b14a0fa"), version(3.0), endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]", - "ncalrpc:[EPMAPPER]"), + "ncalrpc:[EPMAPPER]", "ncacn_http:[593]"), helpstring("EndPoint Mapper"), pointer_default(ptr) ] -- cgit From c33c614eb2a2bef51216e75dfdc96583bf4d4f84 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 23 Apr 2008 08:54:57 -0400 Subject: Revert "Add port number for ncacn_http epmapper." This reverts commit 1304362b3754960f68fb56e0915c3d80cace6e60. This was causing way too many tests to fail. The dcesrv server was failing to start as the NCACN_HTTP transport is considered invalid. Jelmer please check how to properly fix dcesrv server before re-committing your change. (This used to be commit 0c59b39ad8edcaf9f06a2d1393e11e06e4b2f18f) --- source4/librpc/idl/epmapper.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/librpc/idl') diff --git a/source4/librpc/idl/epmapper.idl b/source4/librpc/idl/epmapper.idl index 89cea57ea5..ea04878094 100644 --- a/source4/librpc/idl/epmapper.idl +++ b/source4/librpc/idl/epmapper.idl @@ -15,7 +15,7 @@ import "misc.idl"; uuid("e1af8308-5d1f-11c9-91a4-08002b14a0fa"), version(3.0), endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]", - "ncalrpc:[EPMAPPER]", "ncacn_http:[593]"), + "ncalrpc:[EPMAPPER]"), helpstring("EndPoint Mapper"), pointer_default(ptr) ] -- cgit From 3e80085fb09a89957991780f79f5726029b8a26f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 7 May 2008 15:46:22 +0200 Subject: pvfs: remove XATTR_ATTRIB_FLAG_STICKY_WRITE_TIME code I'll fix this more correctly very soon, so that we'll pass the BASE-DELAYWRITE test. metze (This used to be commit b09dd6b65d533832a025a51509dcc84f84b048aa) --- source4/librpc/idl/xattr.idl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'source4/librpc/idl') diff --git a/source4/librpc/idl/xattr.idl b/source4/librpc/idl/xattr.idl index 7e73baee7d..2010d51ce1 100644 --- a/source4/librpc/idl/xattr.idl +++ b/source4/librpc/idl/xattr.idl @@ -31,8 +31,14 @@ interface xattr NTTIME change_time; } xattr_DosInfo1; - const int XATTR_ATTRIB_FLAG_STICKY_WRITE_TIME = 0x1; +/* + We use xattrDosInfo1 again when we store values. + Because the sticky write time is now stored in the opendb + and xattr_DosInfo2Old is only present to parse existing + values from disk. + const int XATTR_ATTRIB_FLAG_STICKY_WRITE_TIME = 0x1; +*/ typedef struct { uint32 flags; uint32 attrib; @@ -43,11 +49,11 @@ interface xattr NTTIME change_time; NTTIME write_time; /* only used when sticky write time is set */ utf8string name; - } xattr_DosInfo2; + } xattr_DosInfo2Old; typedef [switch_type(uint16)] union { [case(1)] xattr_DosInfo1 info1; - [case(2)] xattr_DosInfo2 info2; + [case(2)] xattr_DosInfo2Old oldinfo2; } xattr_DosInfo; typedef [public] struct { -- cgit From 58e7f253eafecca6934162034e88ee19b103c6ee Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 16 May 2008 13:03:01 +1000 Subject: Rework the CLDAP and NBT netlogon requests and responses. This now matches section 7.3.3 of the MS-ATDS specification, and all our current tests pass against windows. There is still more testing to do, and the server implementation to complete. Andrew Bartlett (This used to be commit 431d0c03965cbee85691cd0dc1e2a509c1a2b717) --- source4/librpc/idl/nbt.idl | 325 +++++++++++++++++++-------------------------- 1 file changed, 136 insertions(+), 189 deletions(-) (limited to 'source4/librpc/idl') diff --git a/source4/librpc/idl/nbt.idl b/source4/librpc/idl/nbt.idl index dddfa4e1ce..74e07210cd 100644 --- a/source4/librpc/idl/nbt.idl +++ b/source4/librpc/idl/nbt.idl @@ -8,7 +8,7 @@ encoding if it doesn't work out */ -import "misc.idl", "security.idl", "svcctl.idl"; +import "misc.idl", "security.idl", "svcctl.idl", "samr.idl"; [ helper("libcli/nbt/libnbt.h") ] @@ -338,52 +338,19 @@ interface nbt } nbt_dgram_packet; - /*******************************************/ - /* \MAILSLOT\NET\NETLOGON mailslot requests */ - typedef enum { - NETLOGON_QUERY_FOR_PDC = 0x7, - NETLOGON_ANNOUNCE_UAS = 0xa, - NETLOGON_RESPONSE_FROM_PDC = 0xc, - NETLOGON_QUERY_FOR_PDC2 = 0x12, - NETLOGON_RESPONSE_FROM_PDC2 = 0x17, - NETLOGON_RESPONSE_FROM_PDC_USER = 0x19 - } nbt_netlogon_command; - - /* query for pdc request */ - typedef struct { - astring computer_name; - astring mailslot_name; - [flag(NDR_ALIGN2)] DATA_BLOB _pad; - nstring unicode_name; - uint32 nt_version; - uint16 lmnt_token; - uint16 lm20_token; - } nbt_netlogon_query_for_pdc; - - /* query for pdc request - new style */ - typedef struct { - uint16 request_count; - nstring computer_name; - nstring user_name; - astring mailslot_name; - uint32 unknown[2]; - uint32 nt_version; - uint16 lmnt_token; - uint16 lm20_token; - } nbt_netlogon_query_for_pdc2; + /****************************************** + * \MAILSLOT\NET\NETLOGON mailslot requests + * and + * \MAILSLOT\NET\NTLOGON mailslot requests + */ - /* response from pdc */ - typedef struct { - astring pdc_name; - [flag(NDR_ALIGN2)] DATA_BLOB _pad; - nstring unicode_pdc_name; - nstring domain_name; - uint32 nt_version; - uint16 lmnt_token; - uint16 lm20_token; - } nbt_netlogon_response_from_pdc; + typedef [public,gensize] struct { + uint32 sa_family; + [flag(NDR_BIG_ENDIAN)] ipv4address pdc_ip; + [flag(NDR_REMAINING)] DATA_BLOB remaining; + } nbt_sockaddr; - typedef [bitmap32bit] bitmap { + typedef [bitmap32bit,public] bitmap { NBT_SERVER_PDC = 0x00000001, NBT_SERVER_GC = 0x00000004, NBT_SERVER_LDAP = 0x00000008, @@ -395,107 +362,81 @@ interface nbt NBT_SERVER_GOOD_TIMESERV = 0x00000200 } nbt_server_type; - /* response from pdc - type2 */ - typedef struct { - [flag(NDR_ALIGN4)] DATA_BLOB _pad; - nbt_server_type server_type; - GUID domain_uuid; - nbt_string forest; - nbt_string dns_domain; - nbt_string pdc_dns_name; - nbt_string domain; - nbt_string pdc_name; - nbt_string user_name; - nbt_string server_site; - nbt_string client_site; - uint8 unknown; - uint32 unknown2; - [flag(NDR_BIG_ENDIAN)] - ipv4address pdc_ip; - uint32 unknown3[2]; - uint32 nt_version; - uint16 lmnt_token; - uint16 lm20_token; - } nbt_netlogon_response_from_pdc2; - - typedef enum netr_SamDatabaseID netr_SamDatabaseID; - - /* announce change to UAS or SAM */ - typedef struct { - netr_SamDatabaseID db_index; - hyper serial; - NTTIME timestamp; - } nbt_db_change; + typedef [bitmap32bit,public] bitmap { + NETLOGON_NT_VERSION_1 = 0x00000001, + NETLOGON_NT_VERSION_5 = 0x00000002, + NETLOGON_NT_VERSION_5EX = 0x00000004, + NETLOGON_NT_VERSION_5EX_WITH_IP = 0x00000008, + NETLOGON_NT_VERSION_WITH_CLOSEST_SITE = 0x00000010, + NETLOGON_NT_VERSION_AVIOD_NT4EMUL = 0x01000000, + NETLOGON_NT_VERSION_PDC = 0x10000000, + NETLOGON_NT_VERSION_IP = 0x20000000, + NETLOGON_NT_VERSION_LOCAL = 0x40000000, + NETLOGON_NT_VERSION_GC = 0x80000000 + } netlogon_nt_version_flags; + + + typedef [enum16bit,public] enum { + LOGON_PRIMARY_QUERY = 7, /* Was also NETLOGON_QUERY_FOR_PDC */ + NETLOGON_ANNOUNCE_UAS = 10, + NETLOGON_RESPONSE_FROM_PDC = 12, + LOGON_SAM_LOGON_REQUEST = 18, /* Was also NETLOGON_QUERY_FOR_PDC2, NTLOGON_SAM_LOGON */ + LOGON_SAM_LOGON_RESPONSE = 19, /* Was also NTLOGON_SAM_LOGON_REPLY */ + LOGON_SAM_LOGON_PAUSE_RESPONSE = 20, + LOGON_SAM_LOGON_USER_UNKNOWN = 21, /* Was also NTLOGON_SAM_LOGON_REPLY15 */ + LOGON_SAM_LOGON_RESPONSE_EX = 23, /* was NETLOGON_RESPONSE_FROM_PDC2 */ + LOGON_SAM_LOGON_PAUSE_RESPONSE_EX = 24, + LOGON_SAM_LOGON_USER_UNKNOWN_EX = 25 /* was NETLOGON_RESPONSE_FROM_PDC_USER */ + } netlogon_command; + + typedef bitmap samr_AcctFlags samr_AcctFlags; - /* used to announce SAM changes */ typedef struct { - uint32 serial_lo; - time_t timestamp; - uint32 pulse; - uint32 random; - astring pdc_name; - astring domain; - [flag(NDR_ALIGN2)] DATA_BLOB _pad; - nstring unicode_pdc_name; - nstring unicode_domain; - uint32 db_count; - nbt_db_change dbchange[db_count]; + uint16 request_count; + nstring computer_name; + nstring user_name; + astring mailslot_name; + samr_AcctFlags acct_control; [value(ndr_size_dom_sid0(&sid, ndr->flags))] uint32 sid_size; [subcontext(0),subcontext_size(sid_size)] dom_sid0 sid; - uint32 nt_version; - uint16 lmnt_token; - uint16 lm20_token; - } nbt_netlogon_announce_uas; - - typedef [nodiscriminant] union { - [case(NETLOGON_QUERY_FOR_PDC)] nbt_netlogon_query_for_pdc pdc; - [case(NETLOGON_QUERY_FOR_PDC2)] nbt_netlogon_query_for_pdc2 pdc2; - [case(NETLOGON_ANNOUNCE_UAS)] nbt_netlogon_announce_uas uas; - [case(NETLOGON_RESPONSE_FROM_PDC)] nbt_netlogon_response_from_pdc response; - [case(NETLOGON_RESPONSE_FROM_PDC2)] nbt_netlogon_response_from_pdc2 response2; - [case(NETLOGON_RESPONSE_FROM_PDC_USER)] nbt_netlogon_response_from_pdc2 response2; - } nbt_netlogon_request; + netlogon_nt_version_flags nt_version; + uint16 lmnt_token; + uint16 lm20_token; + } NETLOGON_SAM_LOGON_REQUEST; typedef [flag(NDR_NOALIGN),public] struct { - nbt_netlogon_command command; - [switch_is(command)] nbt_netlogon_request req; - } nbt_netlogon_packet; - - /*******************************************/ - /* CLDAP netlogon response */ - - /* note that these structures are very similar to, but not - quite identical to, the netlogon structures above */ - - typedef struct { - uint16 type; - nstring pdc_name; + netlogon_command command; + nstring server; nstring user_name; - nstring domain_name; - [value(1)] uint32 nt_version; + nstring domain; + netlogon_nt_version_flags nt_version; uint16 lmnt_token; - uint16 lm20_token; - } nbt_cldap_netlogon_1; + uint16 lm20_token; + } NETLOGON_SAM_LOGON_RESPONSE_NT40; - typedef struct { - uint16 type; + typedef [flag(NDR_NOALIGN),public] struct { + netlogon_command command; nstring pdc_name; nstring user_name; nstring domain_name; GUID domain_uuid; - GUID unknown_uuid; + GUID zero_uuid; nbt_string forest; nbt_string dns_domain; nbt_string pdc_dns_name; ipv4address pdc_ip; nbt_server_type server_type; - [value(3)] uint32 nt_version; + netlogon_nt_version_flags nt_version; uint16 lmnt_token; uint16 lm20_token; - } nbt_cldap_netlogon_3; + } NETLOGON_SAM_LOGON_RESPONSE; - typedef struct { - uint32 type; + /* response from pdc hand marshaled (we have an additional + * function that uses this structure), as it has 'optional' + * parts */ + typedef [flag(NDR_NOALIGN),public] struct { + netlogon_command command; + uint16 sbz; /* From the docs */ nbt_server_type server_type; GUID domain_uuid; nbt_string forest; @@ -506,85 +447,91 @@ interface nbt nbt_string user_name; nbt_string server_site; nbt_string client_site; - [value(5)] uint32 nt_version; - uint16 lmnt_token; - uint16 lm20_token; - } nbt_cldap_netlogon_5; - typedef struct { - uint32 type; - nbt_server_type server_type; - GUID domain_uuid; - nbt_string forest; - nbt_string dns_domain; - nbt_string pdc_dns_name; - nbt_string domain; - nbt_string pdc_name; - nbt_string user_name; - nbt_string server_site; - nbt_string client_site; - uint8 unknown; - uint32 unknown2; - [flag(NDR_BIG_ENDIAN)] - ipv4address pdc_ip; - uint32 unknown3[2]; - [value(13)] uint32 nt_version; + /* Optional on NETLOGON_NT_VERSION_5EX_WITH_IP */ + [value(ndr_size_nbt_sockaddr(&sockaddr, ndr->flags))] uint8 sockaddr_size; + [subcontext(0),subcontext_size(sockaddr_size)] nbt_sockaddr sockaddr; + + /* Optional on NETLOGON_NT_VERSION_WITH_CLOSEST_SITE */ + nbt_string next_closest_site; + + netlogon_nt_version_flags nt_version; uint16 lmnt_token; uint16 lm20_token; - } nbt_cldap_netlogon_13; - - typedef [flag(NDR_NOALIGN),public,nodiscriminant] union { - [case(0)] nbt_cldap_netlogon_1 logon1; - [case(1)] nbt_cldap_netlogon_1 logon1; - [case(2)] nbt_cldap_netlogon_3 logon3; - [case(3)] nbt_cldap_netlogon_3 logon3; - [case(4)] nbt_cldap_netlogon_5 logon5; - [case(5)] nbt_cldap_netlogon_5 logon5; - [case(6)] nbt_cldap_netlogon_5 logon5; - [case(7)] nbt_cldap_netlogon_5 logon5; - [default] nbt_cldap_netlogon_13 logon13; - } nbt_cldap_netlogon; - - /*******************************************/ - /* \MAILSLOT\NET\NTLOGON mailslot requests */ - typedef enum { - NTLOGON_SAM_LOGON = 0x12, - NTLOGON_SAM_LOGON_REPLY = 0x13, - NTLOGON_SAM_LOGON_REPLY15 = 0x15 - } nbt_ntlogon_command; + } NETLOGON_SAM_LOGON_RESPONSE_EX; + /* query for pdc request */ typedef struct { - uint16 request_count; - nstring computer_name; - nstring user_name; + astring computer_name; astring mailslot_name; - uint32 acct_control; - [value(ndr_size_dom_sid0(&sid, ndr->flags))] uint32 sid_size; - [subcontext(0),subcontext_size(sid_size)] dom_sid0 sid; - uint32 nt_version; + [flag(NDR_ALIGN2)] DATA_BLOB _pad; + nstring unicode_name; + netlogon_nt_version_flags nt_version; uint16 lmnt_token; uint16 lm20_token; - } nbt_ntlogon_sam_logon; + } nbt_netlogon_query_for_pdc; - typedef struct { - nstring server; - nstring user_name; - nstring domain; - uint32 nt_version; + /* response from pdc */ + typedef [flag(NDR_NOALIGN),public] struct { + netlogon_command command; + astring pdc_name; + [flag(NDR_ALIGN2)] DATA_BLOB _pad; + nstring unicode_pdc_name; + nstring domain_name; + netlogon_nt_version_flags nt_version; uint16 lmnt_token; uint16 lm20_token; - } nbt_ntlogon_sam_logon_reply; + } nbt_netlogon_response_from_pdc; + + typedef enum netr_SamDatabaseID netr_SamDatabaseID; + + /* used to announce SAM changes - MS-NRPC 2.2.1.5.1 */ + typedef struct { + netr_SamDatabaseID db_index; + hyper serial; + NTTIME timestamp; + } nbt_db_change_info; + + typedef struct { + uint32 serial_lo; + time_t timestamp; + uint32 pulse; + uint32 random; + astring pdc_name; + astring domain; + [flag(NDR_ALIGN2)] DATA_BLOB _pad; + nstring unicode_pdc_name; + nstring unicode_domain; + uint32 db_count; + nbt_db_change_info dbchange[db_count]; + [value(ndr_size_dom_sid0(&sid, ndr->flags))] uint32 sid_size; + [subcontext(0),subcontext_size(sid_size)] dom_sid0 sid; + uint32 message_format_version; + uint32 message_token; + } NETLOGON_DB_CHANGE; typedef [nodiscriminant] union { - [case(NTLOGON_SAM_LOGON)] nbt_ntlogon_sam_logon logon; - [case(NTLOGON_SAM_LOGON_REPLY)] nbt_ntlogon_sam_logon_reply reply; - [case(NTLOGON_SAM_LOGON_REPLY15)] nbt_ntlogon_sam_logon_reply reply; - } nbt_ntlogon_request; + [case(LOGON_SAM_LOGON_REQUEST)] NETLOGON_SAM_LOGON_REQUEST logon; + [case(LOGON_PRIMARY_QUERY)] nbt_netlogon_query_for_pdc pdc; + [case(NETLOGON_ANNOUNCE_UAS)] NETLOGON_DB_CHANGE uas; + } nbt_netlogon_request; + +#if 0 + [case(NETLOGON_RESPONSE_FROM_PDC)] nbt_netlogon_response_from_pdc response; + [case(NETLOGON_RESPONSE_FROM_PDC_USER)] nbt_netlogon_response_from_pdc2 response2; + + [case(LOGON_SAM_LOGON_PAUSE_RESPONSE)] NETLOGON_SAM_LOGON_RESPONSE reply; + [case(LOGON_SAM_LOGON_RESPONSE)] NETLOGON_SAM_LOGON_RESPONSE reply; + [case(LOGON_SAM_LOGON_USER_UNKNOWN)] NETLOGON_SAM_LOGON_RESPONSE reply; + [case(LOGON_SAM_LOGON_RESPONSE_EX)] NETLOGON_SAM_LOGON_RESPONSE_EX reply_ex; + [case(LOGON_SAM_LOGON_PAUSE_RESPONSE_EX)] NETLOGON_SAM_LOGON_RESPONSE_EX reply_ex; + [case(LOGON_SAM_LOGON_USER_UNKNOWN_EX)] NETLOGON_SAM_LOGON_RESPONSE_EX reply_ex; +#endif typedef [flag(NDR_NOALIGN),public] struct { - nbt_ntlogon_command command; - [switch_is(command)] nbt_ntlogon_request req; - } nbt_ntlogon_packet; + netlogon_command command; + [switch_is(command)] nbt_netlogon_request req; + } nbt_netlogon_packet; /********************************************************/ /* \MAILSLOT\BROWSE mailslot requests */ -- cgit From 25a82b8fc93ca01b7f142a680ad9a327e8cb8fa9 Mon Sep 17 00:00:00 2001 From: Julien Kerihuel Date: Thu, 15 May 2008 13:54:07 +0200 Subject: This patch adds remaining padding bytes to the dcerpc_fault IDL structure and adds a const 4 bytes blob to pkt.u.fault. Signed-off-by: Stefan Metzmacher (This used to be commit 652b8c5f156b357e231057a5a0fbded88f4f9c5f) --- source4/librpc/idl/dcerpc.idl | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/librpc/idl') diff --git a/source4/librpc/idl/dcerpc.idl b/source4/librpc/idl/dcerpc.idl index b2c67542f5..e228d85c46 100644 --- a/source4/librpc/idl/dcerpc.idl +++ b/source4/librpc/idl/dcerpc.idl @@ -116,6 +116,7 @@ interface dcerpc uint16 context_id; uint8 cancel_count; uint32 status; + [flag(NDR_REMAINING)] DATA_BLOB _pad; } dcerpc_fault; /* the auth types we know about */ -- cgit From 842040d18490d9f6d1fed621aa36946e2becc3e1 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 17 May 2008 12:44:35 +1000 Subject: Explain that the sid must be absent on the NTLOGON mailslot. Andrew Bartlett (This used to be commit a7983387f7a624f6bf5c2fbfa41f849ac4471147) --- source4/librpc/idl/nbt.idl | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/librpc/idl') diff --git a/source4/librpc/idl/nbt.idl b/source4/librpc/idl/nbt.idl index 74e07210cd..e6af2cd035 100644 --- a/source4/librpc/idl/nbt.idl +++ b/source4/librpc/idl/nbt.idl @@ -398,6 +398,7 @@ interface nbt astring mailslot_name; samr_AcctFlags acct_control; [value(ndr_size_dom_sid0(&sid, ndr->flags))] uint32 sid_size; + /* Must not be present (ie, zero size, in request to \MAILSLOT\NET\NTLOGON */ [subcontext(0),subcontext_size(sid_size)] dom_sid0 sid; netlogon_nt_version_flags nt_version; uint16 lmnt_token; -- cgit From 2f773ff347ec2828f94f4980a3aedbde37009737 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 21 May 2008 10:23:02 +1000 Subject: Re-add alignment removed by metze in 0e2f6d481b3e35ed392b2b3340b244c77593819c This manual alignment is required, because the structure is marked as unaligned. Andrew Bartlett (This used to be commit ef5d1c8d320d45b78a1e709964eaada4f5acda59) --- source4/librpc/idl/nbt.idl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source4/librpc/idl') diff --git a/source4/librpc/idl/nbt.idl b/source4/librpc/idl/nbt.idl index e6af2cd035..b82c19ca0b 100644 --- a/source4/librpc/idl/nbt.idl +++ b/source4/librpc/idl/nbt.idl @@ -398,7 +398,10 @@ interface nbt astring mailslot_name; samr_AcctFlags acct_control; [value(ndr_size_dom_sid0(&sid, ndr->flags))] uint32 sid_size; - /* Must not be present (ie, zero size, in request to \MAILSLOT\NET\NTLOGON */ + /* 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; netlogon_nt_version_flags nt_version; uint16 lmnt_token; -- cgit 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') 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