From 8246214e7ef5374acc0a1f97f4f1203374fba7f8 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 13 Jul 2010 12:03:21 -0400 Subject: s3-dcerpc: Remove unused functions and headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit parse_rpc.c is dead, long live parse_rpc.c ! Signed-off-by: Günther Deschner --- source3/include/proto.h | 24 +++++------------------- source3/include/rpc_dce.h | 16 ---------------- 2 files changed, 5 insertions(+), 35 deletions(-) (limited to 'source3/include') diff --git a/source3/include/proto.h b/source3/include/proto.h index cfa68da723..4e36052b19 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4838,6 +4838,11 @@ void set_profile_level(int level, struct server_id src); bool profile_setup(struct messaging_context *msg_ctx, bool rdonly); /* The following definitions come from rpc_client/cli_pipe.c */ +bool smb_register_ndr_interface(const struct ndr_interface_table *interface); +const struct ndr_interface_table *get_iface_from_syntax( + const struct ndr_syntax_id *syntax); +const char *get_pipe_name_from_syntax(TALLOC_CTX *mem_ctx, + const struct ndr_syntax_id *syntax); struct tevent_req *rpc_api_pipe_req_send(TALLOC_CTX *mem_ctx, struct event_context *ev, @@ -5045,8 +5050,6 @@ NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli, /* The following definitions come from rpc_parse/parse_misc.c */ bool smb_io_time(const char *desc, NTTIME *nttime, prs_struct *ps, int depth); -bool smb_io_uuid(const char *desc, struct GUID *uuid, - prs_struct *ps, int depth); /* The following definitions come from rpc_parse/parse_prs.c */ @@ -5096,23 +5099,6 @@ bool prs_uint32s(bool charmode, const char *name, prs_struct *ps, int depth, uin bool prs_init_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx); bool prs_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx); -/* The following definitions come from rpc_parse/parse_rpc.c */ - -bool smb_register_ndr_interface(const struct ndr_interface_table *interface); -const struct ndr_interface_table *get_iface_from_syntax( - const struct ndr_syntax_id *syntax); -const char *get_pipe_name_from_syntax(TALLOC_CTX *mem_ctx, - const struct ndr_syntax_id *syntax); -NTSTATUS dcerpc_pull_dcerpc_bind(TALLOC_CTX *mem_ctx, - const DATA_BLOB *blob, - struct dcerpc_bind *r); -bool smb_io_rpc_hdr_resp(const char *desc, RPC_HDR_RESP *rpc, prs_struct *ps, int depth); -void init_rpc_hdr_auth(RPC_HDR_AUTH *rai, - uint8 auth_type, uint8 auth_level, - uint8 auth_pad_len, - uint32 auth_context_id); -bool smb_io_rpc_hdr_auth(const char *desc, RPC_HDR_AUTH *rai, prs_struct *ps, int depth); - /* The following definitions come from rpc_server/srv_eventlog_nt.c */ /* The following definitions come from rpc_server/rpc_handles.c */ diff --git a/source3/include/rpc_dce.h b/source3/include/rpc_dce.h index 202382781e..e663a56ad6 100644 --- a/source3/include/rpc_dce.h +++ b/source3/include/rpc_dce.h @@ -37,24 +37,8 @@ #define RPC_HDR_REQ_LEN 8 -/* RPC_HDR_RESP - ms response rpc header */ -typedef struct rpc_hdr_resp_info { - uint32 alloc_hint; /* allocation hint - data size (bytes) minus header and tail. */ - uint16 context_id; /* 0 - presentation context identifier */ - uint8 cancel_count; /* 0 - cancel count */ - uint8 reserved; /* 0 - reserved. */ -} RPC_HDR_RESP; - #define RPC_HDR_RESP_LEN 8 -/* RPC_HDR_AUTH */ -typedef struct rpc_hdr_auth_info { - uint8 auth_type; /* See XXX_AUTH_TYPE above. */ - uint8 auth_level; /* See RPC_PIPE_AUTH_XXX_LEVEL above. */ - uint8 auth_pad_len; - uint8 auth_reserved; - uint32 auth_context_id; -} RPC_HDR_AUTH; #define RPC_HDR_AUTH_LEN 8 -- cgit From 31b59bbf99835279a0a78858aca2f327150eb5e2 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 13 Jul 2010 15:43:44 -0400 Subject: s3-dcerpc: Convert rdata from prs_struct to a simple DATA_BLOB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Deschner --- source3/include/ntdomain.h | 2 +- source3/include/proto.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/include') diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index d0006923ff..84b0309195 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -67,7 +67,7 @@ typedef struct _output_data { /* * Raw RPC output data. This does not include RPC headers or footers. */ - prs_struct rdata; + DATA_BLOB rdata; /* The amount of data sent from the current rdata struct. */ uint32 data_sent_length; diff --git a/source3/include/proto.h b/source3/include/proto.h index 4e36052b19..fbd3d91063 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5055,7 +5055,7 @@ bool smb_io_time(const char *desc, NTTIME *nttime, prs_struct *ps, int depth); void prs_dump(const char *name, int v, prs_struct *ps); void prs_dump_before(const char *name, int v, prs_struct *ps); -void prs_dump_region(const char *name, int v, prs_struct *ps, +void prs_dump_region(const char *name, int v, uint8_t *data_p, int from_off, int to_off); void prs_debug(prs_struct *ps, int depth, const char *desc, const char *fn_name); bool prs_init(prs_struct *ps, uint32 size, TALLOC_CTX *ctx, bool io); -- cgit From 8cd3912afa51468e14d13b77394a308dd184b775 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 13 Jul 2010 18:01:16 -0400 Subject: s3-dcerpc: Convert frag from prs_struct to a simple DATA_BLOB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Deschner --- source3/include/ntdomain.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index 84b0309195..f0a97ac24e 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -76,7 +76,7 @@ typedef struct _output_data { * The current fragment being returned. This inclues * headers, data and authentication footer. */ - prs_struct frag; + DATA_BLOB frag; /* The amount of data sent from the current PDU. */ uint32 current_pdu_sent; -- cgit From 2452a7a4c1094047f4c67f0901b746e069639f8f Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 13 Jul 2010 23:56:01 -0400 Subject: s3-dcerpc: consolidate respones packet creation code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Deschner --- source3/include/proto.h | 1 + source3/include/rpc_dce.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/proto.h b/source3/include/proto.h index fbd3d91063..08c7020853 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4843,6 +4843,7 @@ const struct ndr_interface_table *get_iface_from_syntax( const struct ndr_syntax_id *syntax); const char *get_pipe_name_from_syntax(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *syntax); +enum dcerpc_AuthType map_pipe_auth_type_to_rpc_auth_type(enum pipe_auth_type auth_type); struct tevent_req *rpc_api_pipe_req_send(TALLOC_CTX *mem_ctx, struct event_context *ev, diff --git a/source3/include/rpc_dce.h b/source3/include/rpc_dce.h index e663a56ad6..32ab19c157 100644 --- a/source3/include/rpc_dce.h +++ b/source3/include/rpc_dce.h @@ -22,7 +22,7 @@ #ifndef _DCE_RPC_H /* _DCE_RPC_H */ #define _DCE_RPC_H -#define RPC_AUTH_SCHANNEL_SIGN_OR_SEAL_CHK_LEN 0x20 +#define SCHANNEL_SIG_SIZE 0x20 /* Maximum size of the signing data in a fragment. */ #define RPC_MAX_SIGN_SIZE 0x38 /* 56 */ -- cgit From cb3725a9310d88a8d5226025292e25d178d7a4db Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 14 Jul 2010 02:04:04 -0400 Subject: dcerpc: remove ncacn_packet_header and related functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ncacn_packet_header was an artifact and it is not necessary anymore Signed-off-by: Günther Deschner --- source3/include/proto.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'source3/include') diff --git a/source3/include/proto.h b/source3/include/proto.h index 08c7020853..04136a9a0d 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4859,19 +4859,9 @@ NTSTATUS dcerpc_push_ncacn_packet(TALLOC_CTX *mem_ctx, uint32_t call_id, union dcerpc_payload *u, DATA_BLOB *blob); -NTSTATUS dcerpc_push_ncacn_packet_header(TALLOC_CTX *mem_ctx, - enum dcerpc_pkt_type ptype, - uint8_t pfc_flags, - uint16_t frag_length, - uint16_t auth_length, - uint32_t call_id, - DATA_BLOB *blob); NTSTATUS dcerpc_pull_ncacn_packet(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, struct ncacn_packet *r); -NTSTATUS dcerpc_pull_ncacn_packet_header(TALLOC_CTX *mem_ctx, - const DATA_BLOB *blob, - struct ncacn_packet_header *r); NTSTATUS dcerpc_push_dcerpc_auth(TALLOC_CTX *mem_ctx, enum dcerpc_AuthType auth_type, enum dcerpc_AuthLevel auth_level, -- cgit From bd19c964d54571b1cdb8e4f1ea47a24e790e6e3c Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 14 Jul 2010 12:18:49 -0400 Subject: s3-dcerpc: Move common helpers into a common file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Deschner --- source3/include/proto.h | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'source3/include') diff --git a/source3/include/proto.h b/source3/include/proto.h index 04136a9a0d..735f5e2bf8 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4852,26 +4852,6 @@ struct tevent_req *rpc_api_pipe_req_send(TALLOC_CTX *mem_ctx, prs_struct *req_data); NTSTATUS rpc_api_pipe_req_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, prs_struct *reply_pdu); -NTSTATUS dcerpc_push_ncacn_packet(TALLOC_CTX *mem_ctx, - enum dcerpc_pkt_type ptype, - uint8_t pfc_flags, - uint16_t auth_length, - uint32_t call_id, - union dcerpc_payload *u, - DATA_BLOB *blob); -NTSTATUS dcerpc_pull_ncacn_packet(TALLOC_CTX *mem_ctx, - const DATA_BLOB *blob, - struct ncacn_packet *r); -NTSTATUS dcerpc_push_dcerpc_auth(TALLOC_CTX *mem_ctx, - enum dcerpc_AuthType auth_type, - enum dcerpc_AuthLevel auth_level, - uint8_t auth_pad_length, - uint32_t auth_context_id, - const DATA_BLOB *credentials, - DATA_BLOB *blob); -NTSTATUS dcerpc_pull_dcerpc_auth(TALLOC_CTX *mem_ctx, - const DATA_BLOB *blob, - struct dcerpc_auth *r); struct tevent_req *rpc_pipe_bind_send(TALLOC_CTX *mem_ctx, struct event_context *ev, struct rpc_pipe_client *cli, -- cgit From 79c207ed62ef661add5d48ea898b7a415a9c17d9 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 14 Jul 2010 13:56:13 -0400 Subject: s3-dceprc: Use IDL defined constants for length calculations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Deschner --- source3/include/rpc_dce.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'source3/include') diff --git a/source3/include/rpc_dce.h b/source3/include/rpc_dce.h index 32ab19c157..4a4068be6f 100644 --- a/source3/include/rpc_dce.h +++ b/source3/include/rpc_dce.h @@ -31,15 +31,6 @@ /* #define MAX_PDU_FRAG_LEN 0x1630 this is what wnt sets */ #define RPC_MAX_PDU_FRAG_LEN 0x10b8 /* this is what w2k sets */ -#define RPC_IFACE_LEN (UUID_SIZE + 4) - #define RPC_HEADER_LEN 16 -#define RPC_HDR_REQ_LEN 8 - -#define RPC_HDR_RESP_LEN 8 - - -#define RPC_HDR_AUTH_LEN 8 - #endif /* _DCE_RPC_H */ -- cgit From ff121c89d365db657128bb53bd63d18c8bfa7155 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 14 Jul 2010 19:39:54 -0400 Subject: s3-dcerpc: Use DATA_BLOB instead of prs_struct for reply_pdu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Deschner --- source3/include/proto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/proto.h b/source3/include/proto.h index 735f5e2bf8..a7d8782497 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4851,7 +4851,7 @@ struct tevent_req *rpc_api_pipe_req_send(TALLOC_CTX *mem_ctx, uint8_t op_num, prs_struct *req_data); NTSTATUS rpc_api_pipe_req_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, - prs_struct *reply_pdu); + DATA_BLOB *reply_pdu); struct tevent_req *rpc_pipe_bind_send(TALLOC_CTX *mem_ctx, struct event_context *ev, struct rpc_pipe_client *cli, -- cgit From 8f2bfa88b5846528aa78840979a8ce8babef2cc0 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 15 Jul 2010 08:48:51 -0400 Subject: s3-dcerpc: Use DATA_BLOB instead of prs_struct for req_data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Deschner --- source3/include/proto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/proto.h b/source3/include/proto.h index a7d8782497..cb01c38a30 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4849,7 +4849,7 @@ struct tevent_req *rpc_api_pipe_req_send(TALLOC_CTX *mem_ctx, struct event_context *ev, struct rpc_pipe_client *cli, uint8_t op_num, - prs_struct *req_data); + DATA_BLOB *req_data); NTSTATUS rpc_api_pipe_req_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, DATA_BLOB *reply_pdu); struct tevent_req *rpc_pipe_bind_send(TALLOC_CTX *mem_ctx, -- cgit From 100d37fc4624690423f6a932709b3f9046d05c64 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 15 Jul 2010 10:28:59 -0400 Subject: s3-dcerpc: Use DATA_BLOB for pipes_struct input data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Deschner --- source3/include/ntdomain.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index f0a97ac24e..524c9ecc9b 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -105,7 +105,8 @@ typedef struct _input_data { * the rpc headers and auth footers removed. * The maximum length of this (1Mb) is strictly enforced. */ - prs_struct data; + DATA_BLOB data; + } input_data; struct handle_list; -- cgit From 67b6fe3dc39aaf88787471b1ce10f47db74c5b1e Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 15 Jul 2010 16:19:04 -0400 Subject: s3-misc: Move smb_io_time() to regfio.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is the last file using this function and we do not want anyone else to keep using hand marshalled stuff anyway. So make it also private to that file. Signed-off-by: Günther Deschner --- source3/include/proto.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source3/include') diff --git a/source3/include/proto.h b/source3/include/proto.h index cb01c38a30..a9ae3d6973 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5018,10 +5018,6 @@ NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli, const struct ndr_interface_table *table, uint32 opnum, void *r); -/* The following definitions come from rpc_parse/parse_misc.c */ - -bool smb_io_time(const char *desc, NTTIME *nttime, prs_struct *ps, int depth); - /* The following definitions come from rpc_parse/parse_prs.c */ void prs_dump(const char *name, int v, prs_struct *ps); -- cgit From 7520d8e9263f43e756d73dfd036cab215fe0d5fb Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 15 Jul 2010 17:27:11 -0400 Subject: s3-parse_prs: Remove unuesd functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Deschner --- source3/include/proto.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source3/include') diff --git a/source3/include/proto.h b/source3/include/proto.h index a9ae3d6973..abb498ce4d 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5020,10 +5020,6 @@ NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli, /* The following definitions come from rpc_parse/parse_prs.c */ -void prs_dump(const char *name, int v, prs_struct *ps); -void prs_dump_before(const char *name, int v, prs_struct *ps); -void prs_dump_region(const char *name, int v, uint8_t *data_p, - int from_off, int to_off); void prs_debug(prs_struct *ps, int depth, const char *desc, const char *fn_name); bool prs_init(prs_struct *ps, uint32 size, TALLOC_CTX *ctx, bool io); void prs_mem_free(prs_struct *ps); -- cgit From f4c6c7e7b8714e8ab6b1245ab95e19133956d83e Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 15 Jul 2010 17:45:29 -0400 Subject: Move the remnants of rpc_parse code under registry/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The registry code is the only last user of this code. Move everything under registry/ and hope someone will get rid od it completely from there in the future. Signed-off-by: Günther Deschner --- source3/include/ntdomain.h | 35 ----------------------------------- source3/include/proto.h | 44 -------------------------------------------- source3/include/regfio.h | 1 + source3/include/rpc_dce.h | 3 +++ 4 files changed, 4 insertions(+), 79 deletions(-) (limited to 'source3/include') diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index 524c9ecc9b..629e51cea3 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -28,41 +28,6 @@ * in the NTDOM branch - it didn't belong there. */ -#define prs_init_empty( _ps_, _ctx_, _io_ ) (void) prs_init((_ps_), 0, (_ctx_), (_io_)) - -typedef struct _prs_struct { - bool io; /* parsing in or out of data stream */ - /* - * If the (incoming) data is big-endian. On output we are - * always little-endian. - */ - bool bigendian_data; - uint8 align; /* data alignment */ - bool is_dynamic; /* Do we own this memory or not ? */ - uint32 data_offset; /* Current working offset into data. */ - uint32 buffer_size; /* Current allocated size of the buffer. */ - uint32 grow_size; /* size requested via prs_grow() calls */ - /* The buffer itself. If "is_dynamic" is true this - * MUST BE TALLOC'ed off mem_ctx. */ - char *data_p; - TALLOC_CTX *mem_ctx; /* When unmarshalling, use this.... */ -} prs_struct; - -/* - * Defines for io member of prs_struct. - */ - -#define MARSHALL 0 -#define UNMARSHALL 1 - -#define MARSHALLING(ps) (!(ps)->io) -#define UNMARSHALLING(ps) ((ps)->io) - -#define RPC_BIG_ENDIAN 1 -#define RPC_LITTLE_ENDIAN 0 - -#define RPC_PARSE_ALIGN 4 - typedef struct _output_data { /* * Raw RPC output data. This does not include RPC headers or footers. diff --git a/source3/include/proto.h b/source3/include/proto.h index abb498ce4d..ad16e7e52f 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5018,50 +5018,6 @@ NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli, const struct ndr_interface_table *table, uint32 opnum, void *r); -/* The following definitions come from rpc_parse/parse_prs.c */ - -void prs_debug(prs_struct *ps, int depth, const char *desc, const char *fn_name); -bool prs_init(prs_struct *ps, uint32 size, TALLOC_CTX *ctx, bool io); -void prs_mem_free(prs_struct *ps); -void prs_mem_clear(prs_struct *ps); -char *prs_alloc_mem_(prs_struct *ps, size_t size, unsigned int count); -char *prs_alloc_mem(prs_struct *ps, size_t size, unsigned int count); -TALLOC_CTX *prs_get_mem_context(prs_struct *ps); -void prs_give_memory(prs_struct *ps, char *buf, uint32 size, bool is_dynamic); -bool prs_set_buffer_size(prs_struct *ps, uint32 newsize); -bool prs_grow(prs_struct *ps, uint32 extra_space); -bool prs_force_grow(prs_struct *ps, uint32 extra_space); -char *prs_data_p(prs_struct *ps); -uint32 prs_data_size(prs_struct *ps); -uint32 prs_offset(prs_struct *ps); -bool prs_set_offset(prs_struct *ps, uint32 offset); -bool prs_append_prs_data(prs_struct *dst, prs_struct *src); -bool prs_append_some_data(prs_struct *dst, void *src_base, uint32_t start, - uint32_t len); -bool prs_append_some_prs_data(prs_struct *dst, prs_struct *src, int32 start, uint32 len); -bool prs_copy_data_in(prs_struct *dst, const char *src, uint32 len); -bool prs_copy_data_out(char *dst, prs_struct *src, uint32 len); -bool prs_copy_all_data_out(char *dst, prs_struct *src); -void prs_set_endian_data(prs_struct *ps, bool endian); -bool prs_align(prs_struct *ps); -bool prs_align_uint16(prs_struct *ps); -bool prs_align_uint64(prs_struct *ps); -bool prs_align_custom(prs_struct *ps, uint8 boundary); -bool prs_align_needed(prs_struct *ps, uint32 needed); -char *prs_mem_get(prs_struct *ps, uint32 extra_size); -void prs_switch_type(prs_struct *ps, bool io); -bool prs_uint8(const char *name, prs_struct *ps, int depth, uint8 *data8); -bool prs_uint16(const char *name, prs_struct *ps, int depth, uint16 *data16); -bool prs_uint32(const char *name, prs_struct *ps, int depth, uint32 *data32); -bool prs_int32(const char *name, prs_struct *ps, int depth, int32 *data32); -bool prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64); -bool prs_dcerpc_status(const char *name, prs_struct *ps, int depth, NTSTATUS *status); -bool prs_uint8s(bool charmode, const char *name, prs_struct *ps, int depth, uint8 *data8s, int len); -bool prs_uint16s(bool charmode, const char *name, prs_struct *ps, int depth, uint16 *data16s, int len); -bool prs_uint32s(bool charmode, const char *name, prs_struct *ps, int depth, uint32 *data32s, int len); -bool prs_init_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx); -bool prs_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx); - /* The following definitions come from rpc_server/srv_eventlog_nt.c */ /* The following definitions come from rpc_server/rpc_handles.c */ diff --git a/source3/include/regfio.h b/source3/include/regfio.h index 840fbcd89a..f2d952b169 100644 --- a/source3/include/regfio.h +++ b/source3/include/regfio.h @@ -23,6 +23,7 @@ * Thanks Nigel! ***********************************************************/ +#include "registry/reg_parse_prs.h" #ifndef _REGFIO_H #define _REGFIO_H diff --git a/source3/include/rpc_dce.h b/source3/include/rpc_dce.h index 4a4068be6f..7be8a8a6f7 100644 --- a/source3/include/rpc_dce.h +++ b/source3/include/rpc_dce.h @@ -33,4 +33,7 @@ #define RPC_HEADER_LEN 16 +#define RPC_BIG_ENDIAN 1 +#define RPC_LITTLE_ENDIAN 0 + #endif /* _DCE_RPC_H */ -- cgit From 914fd13eddef5cd917a10da1816565acfaa5fd57 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 16 Jul 2010 02:20:34 +0200 Subject: s3-registry: use some prs macros to the only place where they are used. Guenther --- source3/include/smb_macros.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source3/include') diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h index e5af20bac3..757c8a2c1e 100644 --- a/source3/include/smb_macros.h +++ b/source3/include/smb_macros.h @@ -273,8 +273,6 @@ NULL returns on zero request. JRA. #if defined(PARANOID_MALLOC_CHECKER) -#define PRS_ALLOC_MEM(ps, type, count) (type *)prs_alloc_mem_((ps),sizeof(type),(count)) - /* Get medieval on our ass about malloc.... */ /* Restrictions on malloc/realloc/calloc. */ @@ -311,8 +309,6 @@ NULL returns on zero request. JRA. #else -#define PRS_ALLOC_MEM(ps, type, count) (type *)prs_alloc_mem((ps),sizeof(type),(count)) - /* Regular malloc code. */ #define SMB_MALLOC(s) malloc(s) -- cgit