From 7001a877d417f6b1e4125c5f2fb132e8577e9888 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 12 Feb 2008 16:14:43 +0100 Subject: nbt.idl: don't use astring15 anymore and use an charset() array metze (This used to be commit bb143c76fb971bc2a1d69954d37ab20a953f2b69) --- source4/librpc/idl/nbt.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/nbt.idl b/source4/librpc/idl/nbt.idl index d4c2bf1ad0..17304bfa0d 100644 --- a/source4/librpc/idl/nbt.idl +++ b/source4/librpc/idl/nbt.idl @@ -143,7 +143,7 @@ interface nbt } nbt_statistics; typedef struct { - astring15 name; + [charset(DOS)] uint8 name[15]; nbt_name_type type; nb_flags nb_flags; } nbt_status_name; -- cgit From 1f3e4e2deab26cae000268b4067ab8c2e2eee3ef Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 12 Feb 2008 16:15:34 +0100 Subject: spoolss.idl: don't use string32 anymore and use an charset() array metze (This used to be commit 746a715715c7af8036192ba6d74e282ceaec8c0d) --- source4/librpc/idl/spoolss.idl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/spoolss.idl b/source4/librpc/idl/spoolss.idl index 114c06a00d..33b4dba7b2 100644 --- a/source4/librpc/idl/spoolss.idl +++ b/source4/librpc/idl/spoolss.idl @@ -58,7 +58,7 @@ import "security.idl", "winreg.idl"; } spoolss_PrinterInfo0; typedef [public,gensize] struct { - string32 devicename; + [charset(UTF16)] uint16 devicename[32]; uint16 specversion; uint16 driverversion; uint16 size; @@ -77,7 +77,7 @@ import "security.idl", "winreg.idl"; uint16 yresolution; uint16 ttoption; uint16 collate; - string32 formname; + [charset(UTF16)] uint16 formname[32]; uint16 logpixels; uint32 bitsperpel; uint32 pelswidth; -- cgit From be25cdebcbdd0c26050076629d4edfbababe2852 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 12 Feb 2008 16:16:35 +0100 Subject: librpc: remove special support for fixed length strings Fixed arrays with the charset() attribute do the same metze (This used to be commit 9620b86e96e8065c0ff6db0d95130ab53581d468) --- source4/librpc/idl/idl_types.h | 12 ----------- source4/librpc/ndr/libndr.h | 2 -- source4/librpc/ndr/ndr_string.c | 45 +---------------------------------------- 3 files changed, 1 insertion(+), 58 deletions(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/idl_types.h b/source4/librpc/idl/idl_types.h index f21f3e660d..01524c2984 100644 --- a/source4/librpc/idl/idl_types.h +++ b/source4/librpc/idl/idl_types.h @@ -5,8 +5,6 @@ #define STR_NOTERM LIBNDR_FLAG_STR_NOTERM #define STR_NULLTERM LIBNDR_FLAG_STR_NULLTERM #define STR_BYTESIZE LIBNDR_FLAG_STR_BYTESIZE -#define STR_FIXLEN32 LIBNDR_FLAG_STR_FIXLEN32 -#define STR_FIXLEN15 LIBNDR_FLAG_STR_FIXLEN15 #define STR_CONFORMANT LIBNDR_FLAG_STR_CONFORMANT #define STR_CHARLEN LIBNDR_FLAG_STR_CHARLEN #define STR_UTF8 LIBNDR_FLAG_STR_UTF8 @@ -21,16 +19,6 @@ */ #define nstring [flag(STR_NULLTERM)] string -/* - fixed length 32 character UCS-2 string -*/ -#define string32 [flag(STR_FIXLEN32)] string - -/* - fixed length 16 character ascii string -*/ -#define astring15 [flag(STR_ASCII|STR_FIXLEN15)] string - /* an ascii string prefixed with [offset] [length], both 32 bits null terminated diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h index 1ecc6f3c38..731ef0f60b 100644 --- a/source4/librpc/ndr/libndr.h +++ b/source4/librpc/ndr/libndr.h @@ -109,11 +109,9 @@ struct ndr_print { #define LIBNDR_FLAG_STR_NULLTERM (1<<6) #define LIBNDR_FLAG_STR_SIZE2 (1<<7) #define LIBNDR_FLAG_STR_BYTESIZE (1<<8) -#define LIBNDR_FLAG_STR_FIXLEN32 (1<<9) #define LIBNDR_FLAG_STR_CONFORMANT (1<<10) #define LIBNDR_FLAG_STR_CHARLEN (1<<11) #define LIBNDR_FLAG_STR_UTF8 (1<<12) -#define LIBNDR_FLAG_STR_FIXLEN15 (1<<13) #define LIBNDR_STRING_FLAGS (0x7FFC) diff --git a/source4/librpc/ndr/ndr_string.c b/source4/librpc/ndr/ndr_string.c index 69a7eca1a8..79548f81bc 100644 --- a/source4/librpc/ndr/ndr_string.c +++ b/source4/librpc/ndr/ndr_string.c @@ -259,24 +259,6 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags, *s = as; break; - case LIBNDR_FLAG_STR_FIXLEN15: - case LIBNDR_FLAG_STR_FIXLEN32: - len1 = (flags & LIBNDR_FLAG_STR_FIXLEN32)?32:15; - NDR_PULL_NEED_BYTES(ndr, len1*byte_mul); - ret = convert_string_talloc(ndr->current_mem_ctx, - ndr->iconv_convenience, - chset, CH_UNIX, - ndr->data+ndr->offset, - len1*byte_mul, - (void **)&as); - if (ret == -1) { - return ndr_pull_error(ndr, NDR_ERR_CHARCNV, - "Bad character conversion"); - } - NDR_CHECK(ndr_pull_advance(ndr, len1*byte_mul)); - *s = as; - break; - case LIBNDR_FLAG_STR_NOTERM: if (!(ndr->flags & LIBNDR_FLAG_REMAINING)) { return ndr_pull_error(ndr, NDR_ERR_STRING, "Bad string flags 0x%x (missing NDR_REMAINING)\n", @@ -349,10 +331,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push *ndr, int ndr_flags, flags &= ~LIBNDR_FLAG_STR_CONFORMANT; - if (!(flags & - (LIBNDR_FLAG_STR_NOTERM | - LIBNDR_FLAG_STR_FIXLEN15 | - LIBNDR_FLAG_STR_FIXLEN32))) { + if (!(flags & LIBNDR_FLAG_STR_NOTERM)) { s_len++; } d_len = convert_string_talloc(ndr, ndr->iconv_convenience, CH_UNIX, chset, s, s_len, (void **)&dest); @@ -399,21 +378,6 @@ _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push *ndr, int ndr_flags, NDR_CHECK(ndr_push_bytes(ndr, dest, d_len)); break; - case LIBNDR_FLAG_STR_FIXLEN15: - case LIBNDR_FLAG_STR_FIXLEN32: { - ssize_t fix_len = (flags & LIBNDR_FLAG_STR_FIXLEN32)?32:15; - uint32_t pad_len = fix_len - d_len; - if (d_len > fix_len) { - return ndr_push_error(ndr, NDR_ERR_CHARCNV, - "Bad character conversion"); - } - NDR_CHECK(ndr_push_bytes(ndr, dest, d_len)); - if (pad_len != 0) { - NDR_CHECK(ndr_push_zero(ndr, pad_len)); - } - break; - } - default: if (ndr->flags & LIBNDR_FLAG_REMAINING) { NDR_CHECK(ndr_push_bytes(ndr, dest, d_len)); @@ -439,13 +403,6 @@ _PUBLIC_ size_t ndr_string_array_size(struct ndr_push *ndr, const char *s) unsigned byte_mul = 2; unsigned c_len_term = 1; - if (flags & LIBNDR_FLAG_STR_FIXLEN32) { - return 32; - } - if (flags & LIBNDR_FLAG_STR_FIXLEN15) { - return 15; - } - c_len = s?strlen_m(s):0; if (flags & (LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_UTF8)) { -- cgit From febc8e361ae9fe2f9412b604da62b49cca913ffc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 13 Feb 2008 17:24:23 +1100 Subject: missed a spot in the SMB2 create conversion (This used to be commit 17357072dd175b7548122e40e4cecc6087e52561) --- source4/librpc/rpc/dcerpc_smb2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/librpc') diff --git a/source4/librpc/rpc/dcerpc_smb2.c b/source4/librpc/rpc/dcerpc_smb2.c index b06964d331..a0094b8bae 100644 --- a/source4/librpc/rpc/dcerpc_smb2.c +++ b/source4/librpc/rpc/dcerpc_smb2.c @@ -410,7 +410,7 @@ struct composite_context *dcerpc_pipe_open_smb2_send(struct dcerpc_pipe *p, state->ctx = ctx; ZERO_STRUCT(io); - io.in.access_mask = + io.in.desired_access = SEC_STD_READ_CONTROL | SEC_FILE_READ_ATTRIBUTE | SEC_FILE_WRITE_ATTRIBUTE | @@ -423,11 +423,11 @@ struct composite_context *dcerpc_pipe_open_smb2_send(struct dcerpc_pipe *p, io.in.share_access = NTCREATEX_SHARE_ACCESS_READ | NTCREATEX_SHARE_ACCESS_WRITE; - io.in.open_disposition = NTCREATEX_DISP_OPEN; + io.in.create_disposition = NTCREATEX_DISP_OPEN; io.in.create_options = NTCREATEX_OPTIONS_NON_DIRECTORY_FILE | NTCREATEX_OPTIONS_UNKNOWN_400000; - io.in.impersonation = NTCREATEX_IMPERSONATION_IMPERSONATION; + io.in.impersonation_level = NTCREATEX_IMPERSONATION_IMPERSONATION; if ((strncasecmp(pipe_name, "/pipe/", 6) == 0) || (strncasecmp(pipe_name, "\\pipe\\", 6) == 0)) { -- cgit From c41944b9f9e6dc5287065b24ab1c1fc20ec36cb4 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 13 Feb 2008 10:36:49 +0100 Subject: spoolss.idl: improve idl for EnumPrinterData and not use 'lstring' any more metze (This used to be commit d6cdddbcf37d120cb365bc7f8188858c8776e2e0) --- source4/librpc/idl/spoolss.idl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/spoolss.idl b/source4/librpc/idl/spoolss.idl index 33b4dba7b2..2144393ebd 100644 --- a/source4/librpc/idl/spoolss.idl +++ b/source4/librpc/idl/spoolss.idl @@ -1407,12 +1407,13 @@ import "security.idl", "winreg.idl"; WERROR spoolss_EnumPrinterData( [in,ref] policy_handle *handle, [in] uint32 enum_index, + [out,ref,size_is(value_offered/2),charset(UTF16)] uint16 *value_name, [in] uint32 value_offered, - [out] lstring value_name, - [out] uint32 value_needed, - [out] uint32 printerdata_type, - [out] DATA_BLOB buffer, - [in,out,ref] uint32 *data_size + [out,ref] uint32 *value_needed, + [out,ref] uint32 *printerdata_type, + [out,ref] DATA_BLOB *buffer, + [in] uint32 data_offered, + [out,ref] uint32 *data_needed ); /******************/ -- cgit From 272892277440cbde79039d6cdaf4fb4215b7cf0c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 13 Feb 2008 10:41:57 +0100 Subject: idl_types: remove unused lstring metze (This used to be commit 5100452cf3b3c3c5dcdb77a9efe27e8c506d1d43) --- source4/librpc/idl/idl_types.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/idl_types.h b/source4/librpc/idl/idl_types.h index 01524c2984..9885ca5bf6 100644 --- a/source4/librpc/idl/idl_types.h +++ b/source4/librpc/idl/idl_types.h @@ -9,11 +9,6 @@ #define STR_CHARLEN LIBNDR_FLAG_STR_CHARLEN #define STR_UTF8 LIBNDR_FLAG_STR_UTF8 -/* - a UCS2 string prefixed with [size], 32 bits -*/ -#define lstring [flag(STR_SIZE4)] string - /* a null terminated UCS2 string */ -- cgit From 80d7c3ef7de5fb100807f30e84aff10ef48afa08 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 13 Feb 2008 17:31:17 +0100 Subject: krb5pac.idl: use charset() instead of string type with flags metze (This used to be commit 30657ae0ebdb85ae995a3dfe3ce123851fd92e0f) --- source4/librpc/idl/krb5pac.idl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/krb5pac.idl b/source4/librpc/idl/krb5pac.idl index fa6bf51e44..efd4aa860f 100644 --- a/source4/librpc/idl/krb5pac.idl +++ b/source4/librpc/idl/krb5pac.idl @@ -16,7 +16,8 @@ interface krb5pac { typedef struct { NTTIME logon_time; - [flag(STR_SIZE2|STR_NOTERM|STR_BYTESIZE)] string account_name; + [value(2*strlen_m(account_name))] uint16 size; + [charset(UTF16)] uint8 account_name[size]; } PAC_LOGON_NAME; typedef [public,flag(NDR_PAHEX)] struct { -- cgit From f9116ae6db3c10ede2ce55040bc79c7624064bc0 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 14 Feb 2008 15:02:11 +0100 Subject: drsuapi.idl: use charset() instead of the exotic flags() and string metze (This used to be commit 70c7faace76a84d2fe15accf4f8a1ca0ad905bd4) --- source4/librpc/idl/drsuapi.idl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/drsuapi.idl b/source4/librpc/idl/drsuapi.idl index f298b7e321..fb24122e26 100644 --- a/source4/librpc/idl/drsuapi.idl +++ b/source4/librpc/idl/drsuapi.idl @@ -130,7 +130,8 @@ interface drsuapi [value(ndr_size_dom_sid28(&sid, ndr->flags))] uint32 __ndr_size_sid; GUID guid; dom_sid28 sid; - [flag(STR_SIZE4|STR_CHARLEN|STR_CONFORMANT)] string dn; + [value(strlen_m(dn))] uint32 __ndr_size_dn; + [charset(UTF16),size_is(__ndr_size_dn+1)] uint16 dn[]; } drsuapi_DsReplicaObjectIdentifier; typedef [public] bitmap { @@ -451,7 +452,8 @@ interface drsuapi [value(ndr_size_dom_sid28(&sid,ndr->flags))] uint32 __ndr_size_sid; GUID guid; dom_sid28 sid; - [flag(STR_SIZE4|STR_CHARLEN)] string dn; + [value(strlen_m(dn))] uint32 __ndr_size_dn; + [charset(UTF16)] uint16 dn[__ndr_size_dn+1]; } drsuapi_DsReplicaObjectIdentifier3; typedef [public,gensize] struct { @@ -459,7 +461,8 @@ interface drsuapi [value(ndr_size_dom_sid28(&sid,ndr->flags))] uint32 __ndr_size_sid; GUID guid; dom_sid28 sid; - [flag(STR_SIZE4|STR_CHARLEN)] string dn; + [value(strlen_m(dn))] uint32 __ndr_size_dn; + [charset(UTF16)] uint16 dn[__ndr_size_dn+1]; [value(binary.length + 4)] uint32 __ndr_size_binary; [flag(NDR_REMAINING)] DATA_BLOB binary; } drsuapi_DsReplicaObjectIdentifier3Binary; -- cgit From a37ddb8ae0fe52b4adea3c35bd4e6e85b909d83f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 14 Feb 2008 15:03:37 +0100 Subject: ndr_sec_helper: create a completely zero sid, so that ndr_size_dom_sid28 can return 0 metze (This used to be commit ae6976eb4a8ddafc40ce91f68c9bca861502093b) --- source4/librpc/ndr/ndr_sec_helper.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/librpc') diff --git a/source4/librpc/ndr/ndr_sec_helper.c b/source4/librpc/ndr/ndr_sec_helper.c index 30eaf9c6f4..5a0178bd25 100644 --- a/source4/librpc/ndr/ndr_sec_helper.c +++ b/source4/librpc/ndr/ndr_sec_helper.c @@ -187,6 +187,9 @@ enum ndr_err_code ndr_pull_dom_sid28(struct ndr_pull *ndr, int ndr_flags, struct if (!NDR_ERR_CODE_IS_SUCCESS(status)) { /* handle a w2k bug which send random data in the buffer */ ZERO_STRUCTP(sid); + } else if (sid->num_auths == 0 && sid->sub_auths) { + talloc_free(sid->sub_auths); + sid->sub_auths = NULL; } return NDR_ERR_SUCCESS; -- cgit From 8410878e2a6c270a50ee1cfa73c9d115a0666dd8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 14 Feb 2008 15:01:23 +0100 Subject: dcerpc.idl: use charset() instead of ascstr3 metze (This used to be commit 47447f60bc8e5dd1021752e9b011f22762e45eed) --- source4/librpc/idl/dcerpc.idl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/dcerpc.idl b/source4/librpc/idl/dcerpc.idl index fcb0be4639..b2c67542f5 100644 --- a/source4/librpc/idl/dcerpc.idl +++ b/source4/librpc/idl/dcerpc.idl @@ -64,7 +64,8 @@ interface dcerpc uint16 max_xmit_frag; uint16 max_recv_frag; uint32 assoc_group_id; - ascstr3 secondary_address; + [value(strlen(secondary_address)+1)] uint16 secondary_address_size; + [charset(DOS)] uint8 secondary_address[secondary_address_size]; [flag(NDR_ALIGN4)] DATA_BLOB _pad1; uint8 num_results; dcerpc_ack_ctx ctx_list[num_results]; -- cgit From 7f4d2ac6a2a9c3a8692d52b573c91651dacd5820 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 14 Feb 2008 16:07:49 +0100 Subject: epmapper.idl: add link to official IDL metze (This used to be commit b5c0a6c114b5c832f742bd84179e5e9a5aed3698) --- source4/librpc/idl/epmapper.idl | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/epmapper.idl b/source4/librpc/idl/epmapper.idl index baf9f23877..675ba89ee6 100644 --- a/source4/librpc/idl/epmapper.idl +++ b/source4/librpc/idl/epmapper.idl @@ -3,6 +3,7 @@ /* endpoint mapper interface Related links: + http://www.opengroup.org/onlinepubs/9629399/apdxo.htm : The official IDL for this pipe http://www.opengroup.org/onlinepubs/9629399/apdxl.htm : Details on towers http://www.opengroup.org/onlinepubs/9629399/chap6.htm#tagcjh_11_02_03_01: binding strings -- cgit From 1b09ec14a8f5e33ce4a6f41cf9d4ca8e53df4c87 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 14 Feb 2008 16:08:17 +0100 Subject: epmapper.idl: don't use ascstr2 anymore metze (This used to be commit 96f1ad6d27fdfecd3a07a05052c8085d66472106) --- source4/librpc/idl/epmapper.idl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/epmapper.idl b/source4/librpc/idl/epmapper.idl index 675ba89ee6..60ff338ec4 100644 --- a/source4/librpc/idl/epmapper.idl +++ b/source4/librpc/idl/epmapper.idl @@ -223,7 +223,16 @@ interface epmapper typedef struct { GUID object; epm_twr_t *tower; - ascstr2 annotation; + /* + * In theory this should be: + * [charset(DOS),string] uint8 annotation[64] + * But midl treats this as: + * [charset(DOS),string] uint8 annotation[] + * and pidl doesn't support this yet + */ + [value(0)] uint32 __annotation_offset; + [value(strlen(annotation)+1)] uint32 __annotation_length; + [charset(DOS)] uint8 annotation[__annotation_length]; } epm_entry_t; typedef struct { -- cgit From de3d54e0559ee5ae9aa6810a3eaf4f237dbc5ae5 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 14 Feb 2008 16:08:50 +0100 Subject: lsa.idl: don't use ascstr_noterm anymore metze (This used to be commit b994f899b42d294c0418bdc82660a2f7510667d6) --- source4/librpc/idl/lsa.idl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/lsa.idl b/source4/librpc/idl/lsa.idl index 8d26ec0aad..c2b7b5b58a 100644 --- a/source4/librpc/idl/lsa.idl +++ b/source4/librpc/idl/lsa.idl @@ -33,9 +33,9 @@ import "security.idl"; } lsa_Strings; typedef [public] struct { - [value(strlen_m(string))] uint16 length; - [value(strlen_m(string))] uint16 size; - ascstr_noterm *string; + [value(strlen(string))] uint16 length; + [value(strlen(string))] uint16 size; + [charset(DOS),size_is(size),length_is(length)] uint8 *string; } lsa_AsciiString; /******************/ -- cgit From 9d9d54430aed677ae33e51fda5da7b4306c734f1 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 15 Feb 2008 14:56:07 +0100 Subject: lsa.idl: add lsa_AsciiStringLarge metze (This used to be commit 646c597b79cb01474ed8139e4e790206bd84632c) --- source4/librpc/idl/lsa.idl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/lsa.idl b/source4/librpc/idl/lsa.idl index c2b7b5b58a..bc5ccaa78a 100644 --- a/source4/librpc/idl/lsa.idl +++ b/source4/librpc/idl/lsa.idl @@ -38,6 +38,12 @@ import "security.idl"; [charset(DOS),size_is(size),length_is(length)] uint8 *string; } lsa_AsciiString; + typedef [public] struct { + [value(strlen(string))] uint16 length; + [value(strlen(string)+1)] uint16 size; + [charset(DOS),size_is(size),length_is(length)] uint8 *string; + } lsa_AsciiStringLarge; + /******************/ /* Function: 0x00 */ NTSTATUS lsa_Close ( -- cgit From ff0315ba859421dff6aba055887e086fa68c2951 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 18 Feb 2008 20:04:18 +0100 Subject: Rename include to mkinclude to emphasize it is different from make's include. (This used to be commit 0e1d0a874ae3d22b8f97a79b81fe0af3ef53a771) --- source4/librpc/config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/librpc') diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk index 0f5a65121c..2fdef41b2a 100644 --- a/source4/librpc/config.mk +++ b/source4/librpc/config.mk @@ -277,7 +277,7 @@ OBJ_FILES = gen_ndr/ndr_winbind.o PUBLIC_HEADERS = gen_ndr/winbind.h PUBLIC_DEPENDENCIES = LIBNDR NDR_NETLOGON -include ../heimdal_build/perl_path_wrapper.sh ../librpc/idl-deps.pl librpc/idl/*.idl| +mkinclude ../heimdal_build/perl_path_wrapper.sh ../librpc/idl-deps.pl librpc/idl/*.idl| librpc/gen_ndr/tables.c: $(IDL_NDR_PARSE_H_FILES) @echo Generating librpc/gen_ndr/tables.c -- cgit From 7a3f15ff8a4b32c0a9f0114fc8208ddfcde796ce Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 19 Feb 2008 14:44:50 +0100 Subject: lsa.idl: use strlen_m_term() in lsa_StringLarge to support NULL strings metze (This used to be commit bdd8d9ebdf184ee3e23a8de92fa4dec7123a8824) --- source4/librpc/idl/lsa.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/lsa.idl b/source4/librpc/idl/lsa.idl index bc5ccaa78a..64fb2336bb 100644 --- a/source4/librpc/idl/lsa.idl +++ b/source4/librpc/idl/lsa.idl @@ -23,7 +23,7 @@ import "security.idl"; typedef [public] struct { [value(2*strlen_m(string))] uint16 length; - [value(2*(strlen_m(string)+1))] uint16 size; + [value(2*strlen_m_term(string))] uint16 size; [charset(UTF16),size_is(size/2),length_is(length/2)] uint16 *string; } lsa_StringLarge; -- cgit From 611f0152a198e1a5c209b2ca5aad6b121dca9442 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 19 Feb 2008 14:47:22 +0100 Subject: lsa.idl: strlen_m*() also for the lsa_AsciiString* versions We already did this before b994f899b42d294c0418bdc82660a2f7510667d6. This is needed to handle NULL strings, where strlen() would crash... Maybe we should add a strlen_a() and strlen_a_term() later... metze (This used to be commit c388efab13d1be2086a99e6615fa348c4cdc4594) --- source4/librpc/idl/lsa.idl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/lsa.idl b/source4/librpc/idl/lsa.idl index 64fb2336bb..3159a7d16d 100644 --- a/source4/librpc/idl/lsa.idl +++ b/source4/librpc/idl/lsa.idl @@ -33,14 +33,14 @@ import "security.idl"; } lsa_Strings; typedef [public] struct { - [value(strlen(string))] uint16 length; - [value(strlen(string))] uint16 size; + [value(strlen_m(string))] uint16 length; + [value(strlen_m(string))] uint16 size; [charset(DOS),size_is(size),length_is(length)] uint8 *string; } lsa_AsciiString; typedef [public] struct { - [value(strlen(string))] uint16 length; - [value(strlen(string)+1)] uint16 size; + [value(strlen_m(string))] uint16 length; + [value(strlen_m_term(string))] uint16 size; [charset(DOS),size_is(size),length_is(length)] uint8 *string; } lsa_AsciiStringLarge; -- cgit From fc840f3810124d1b83afea172d3940dd54ab42f7 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 14 Feb 2008 16:07:04 +0100 Subject: drsblobs.idl: don't use asclstr metze (This used to be commit f42cc9134004597eff19e477d3ed0693d5e6fef6) --- source4/librpc/idl/drsblobs.idl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/drsblobs.idl b/source4/librpc/idl/drsblobs.idl index 1e80597f4a..27f3a99551 100644 --- a/source4/librpc/idl/drsblobs.idl +++ b/source4/librpc/idl/drsblobs.idl @@ -85,7 +85,8 @@ interface drsblobs { * w2k3 uses version 1 */ typedef [public,gensize] struct { - asclstr dns_name; + [value(strlen(dns_name)+1)] uint32 __dns_name_size; + [charset(DOS)] uint8 dns_name[__dns_name_size]; } repsFromTo1OtherInfo; typedef [public,gensize,flag(NDR_PAHEX)] struct { -- cgit From 4473a07fb3118b4e5197f05c5b930c3eb828a94a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 19 Feb 2008 11:57:32 +0100 Subject: winreg.idl: get rid of initshutdown_String and use lsa_StringLarge metze (This used to be commit 1ccea2a260de83b2e3137f762716ae67070c7024) --- source4/librpc/idl/winreg.idl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/winreg.idl b/source4/librpc/idl/winreg.idl index b489e86c38..5e5d5542b6 100644 --- a/source4/librpc/idl/winreg.idl +++ b/source4/librpc/idl/winreg.idl @@ -2,7 +2,7 @@ winreg interface definition */ -import "lsa.idl", "initshutdown.idl", "security.idl"; +import "lsa.idl", "security.idl"; [ uuid("338cd001-2244-31f1-aaaa-900038001003"), @@ -302,7 +302,11 @@ import "lsa.idl", "initshutdown.idl", "security.idl"; /* Function: 0x18 */ WERROR winreg_InitiateSystemShutdown( [in,unique] uint16 *hostname, - [in,unique] initshutdown_String *message, + /* + * Note: lsa_String and winreg_String both result + * in WERR_INVALID_PARAM + */ + [in,unique] lsa_StringLarge *message, [in] uint32 timeout, [in] uint8 force_apps, [in] uint8 reboot @@ -358,7 +362,11 @@ import "lsa.idl", "initshutdown.idl", "security.idl"; /* Function: 0x1e */ WERROR winreg_InitiateSystemShutdownEx( [in,unique] uint16 *hostname, - [in,unique] initshutdown_String *message, + /* + * Note: lsa_String and winreg_String both result + * in WERR_INVALID_PARAM + */ + [in,unique] lsa_StringLarge *message, [in] uint32 timeout, [in] uint8 force_apps, [in] uint8 reboot, -- cgit From 665a7aafd13aed42a80beaf344dc87f7b753aeea Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 19 Feb 2008 14:58:33 +0100 Subject: initshutdown.idl: get rid of initshutdown_String and use lsa_StringLarge metze (This used to be commit d9303cb08324db5ceb89f69a1a71cc3e16fdf250) --- source4/librpc/idl/initshutdown.idl | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/initshutdown.idl b/source4/librpc/idl/initshutdown.idl index 868e48e28a..ac30be70dd 100644 --- a/source4/librpc/idl/initshutdown.idl +++ b/source4/librpc/idl/initshutdown.idl @@ -4,6 +4,8 @@ initshutdown interface definition */ +import "lsa.idl"; + [ uuid("894de0c0-0d55-11d3-a322-00c04fa321a1"), version(1.0), @@ -12,20 +14,13 @@ helpstring("Init shutdown service") ] interface initshutdown { - typedef struct { - [value(strlen_m_term(name))] uint32 name_size; - [flag(STR_LEN4|STR_NOTERM)] string name; - } initshutdown_String_sub; - - typedef [public] struct { - [value(strlen_m(name->name)*2)] uint16 name_len; - [value(strlen_m_term(name->name)*2)] uint16 name_size; - initshutdown_String_sub *name; - } initshutdown_String; - WERROR initshutdown_Init( [in,unique] uint16 *hostname, - [in,unique] initshutdown_String *message, + /* + * Note: lsa_String and winreg_String both result + * in WERR_INVALID_PARAM + */ + [in,unique] lsa_StringLarge *message, [in] uint32 timeout, [in] uint8 force_apps, [in] uint8 reboot @@ -37,7 +32,11 @@ WERROR initshutdown_InitEx( [in,unique] uint16 *hostname, - [in,unique] initshutdown_String *message, + /* + * Note: lsa_String and winreg_String both result + * in WERR_INVALID_PARAM + */ + [in,unique] lsa_StringLarge *message, [in] uint32 timeout, [in] uint8 force_apps, [in] uint8 reboot, -- cgit