From 12476223c6aa7473c55bcf529639eefce8450680 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 28 Apr 2011 17:26:40 +0200 Subject: s3-tsocket: only include ../lib/tsocket/tsocket.h where needed. Guenther --- source3/rpc_server/srv_pipe_hnd.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/rpc_server/srv_pipe_hnd.c') diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index 5252598726..11689672d6 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -29,6 +29,7 @@ #include "rpc_dce.h" #include "rpc_server/rpc_ncacn_np.h" #include "ntdomain.h" +#include "../lib/tsocket/tsocket.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV -- cgit From 50883cfeb4eed3d538f71443060745f8747044c9 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 28 Apr 2011 17:38:09 +0200 Subject: s3-tevent: only include ../lib/util/tevent wrappers where needed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Guenther Autobuild-User: Günther Deschner Autobuild-Date: Fri Apr 29 14:00:30 CEST 2011 on sn-devel-104 --- source3/rpc_server/srv_pipe_hnd.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/rpc_server/srv_pipe_hnd.c') diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index 11689672d6..6aa9bf8dc2 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -30,6 +30,7 @@ #include "rpc_server/rpc_ncacn_np.h" #include "ntdomain.h" #include "../lib/tsocket/tsocket.h" +#include "../lib/util/tevent_ntstatus.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV -- cgit From 487cb0c96ef8ca05fcef35d0d7c49bc067f6cff7 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 29 Apr 2011 16:19:54 +0200 Subject: s3-rpc_server: remove some unneeded headers. Guenther --- source3/rpc_server/srv_pipe_hnd.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source3/rpc_server/srv_pipe_hnd.c') diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index 6aa9bf8dc2..e13c562351 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -20,11 +20,7 @@ */ #include "includes.h" -#include "../librpc/gen_ndr/srv_spoolss.h" -#include "librpc/gen_ndr/ndr_named_pipe_auth.h" -#include "../libcli/named_pipe_auth/npa_tstream.h" #include "rpc_server.h" -#include "smbd/globals.h" #include "fake_file.h" #include "rpc_dce.h" #include "rpc_server/rpc_ncacn_np.h" -- cgit From 047d8c073b57bc12648a251deaceedb65f4f59cf Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 29 Apr 2011 23:32:28 +0200 Subject: s3-proto: move more rpc_server prototypes out of proto.h Guenther --- source3/rpc_server/srv_pipe_hnd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/rpc_server/srv_pipe_hnd.c') diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index e13c562351..fa296606a9 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -23,8 +23,9 @@ #include "rpc_server.h" #include "fake_file.h" #include "rpc_dce.h" -#include "rpc_server/rpc_ncacn_np.h" #include "ntdomain.h" +#include "rpc_server/rpc_ncacn_np.h" +#include "rpc_server/srv_pipe_hnd.h" #include "../lib/tsocket/tsocket.h" #include "../lib/util/tevent_ntstatus.h" -- cgit From 56cd3b3bbbb595cb0c98fa2dfa397c915fbf37d2 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 2 May 2011 13:27:45 +0200 Subject: s3-rpc_server: (re)move last globally included rpc_server prototypes. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Guenther Autobuild-User: Günther Deschner Autobuild-Date: Mon May 2 16:05:31 CEST 2011 on sn-devel-104 --- source3/rpc_server/srv_pipe_hnd.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/rpc_server/srv_pipe_hnd.c') diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index fa296606a9..0c128a0ac5 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -26,6 +26,7 @@ #include "ntdomain.h" #include "rpc_server/rpc_ncacn_np.h" #include "rpc_server/srv_pipe_hnd.h" +#include "rpc_server/srv_pipe.h" #include "../lib/tsocket/tsocket.h" #include "../lib/util/tevent_ntstatus.h" -- cgit From 7d6ebe0de7d99c20854cafb8af50fe8f30ed778a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 5 May 2011 16:19:49 -0700 Subject: More const fixes. Remove CONST_DISCARD. --- source3/rpc_server/srv_pipe_hnd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/rpc_server/srv_pipe_hnd.c') diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index 0c128a0ac5..5702a0e8d7 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -37,7 +37,7 @@ Ensures we have at least RPC_HEADER_LEN amount of data in the incoming buffer. ****************************************************************************/ -static ssize_t fill_rpc_header(struct pipes_struct *p, char *data, size_t data_to_copy) +static ssize_t fill_rpc_header(struct pipes_struct *p, const char *data, size_t data_to_copy) { size_t len_needed_to_complete_hdr = MIN(data_to_copy, RPC_HEADER_LEN - p->in_data.pdu.length); @@ -126,7 +126,7 @@ static void free_pipe_context(struct pipes_struct *p) Accepts incoming data on an rpc pipe. Processes the data in pdu sized units. ****************************************************************************/ -ssize_t process_incoming_data(struct pipes_struct *p, char *data, size_t n) +ssize_t process_incoming_data(struct pipes_struct *p, const char *data, size_t n) { size_t data_to_copy = MIN(n, RPC_MAX_PDU_FRAG_LEN - p->in_data.pdu.length); @@ -231,7 +231,7 @@ ssize_t process_incoming_data(struct pipes_struct *p, char *data, size_t n) Accepts incoming data on an internal rpc pipe. ****************************************************************************/ -static ssize_t write_to_internal_pipe(struct pipes_struct *p, char *data, size_t n) +static ssize_t write_to_internal_pipe(struct pipes_struct *p, const char *data, size_t n) { size_t data_left = n; @@ -535,7 +535,7 @@ struct tevent_req *np_write_send(TALLOC_CTX *mem_ctx, struct event_context *ev, struct pipes_struct *p = talloc_get_type_abort( handle->private_data, struct pipes_struct); - state->nwritten = write_to_internal_pipe(p, (char *)data, len); + state->nwritten = write_to_internal_pipe(p, (const char *)data, len); status = (state->nwritten >= 0) ? NT_STATUS_OK : NT_STATUS_UNEXPECTED_IO_ERROR; @@ -549,7 +549,7 @@ struct tevent_req *np_write_send(TALLOC_CTX *mem_ctx, struct event_context *ev, state->ev = ev; state->p = p; - state->iov.iov_base = CONST_DISCARD(void *, data); + state->iov.iov_base = discard_const_p(void, data); state->iov.iov_len = len; subreq = tstream_writev_queue_send(state, ev, -- cgit From c615ebed6e3d273a682806b952d543e834e5630d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 13 May 2011 20:21:30 +0200 Subject: s3-lib Replace StrCaseCmp() with strcasecmp_m() strcasecmp_m() never needs to call to talloc, and via next_codepoint() still has an ASCII fast-path bypassing iconv() calls. Andrew Bartlett --- source3/rpc_server/srv_pipe_hnd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/rpc_server/srv_pipe_hnd.c') diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index 5702a0e8d7..1c7363299a 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -433,7 +433,7 @@ NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name, rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM, "rpc_server", name, "embedded"); - if (StrCaseCmp(rpcsrv_type, "embedded") != 0) { + if (strcasecmp_m(rpcsrv_type, "embedded") != 0) { external = true; } -- cgit From 751ecd9bf7e3d657cad7de72f396a15357f9d26f Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 31 May 2011 13:42:52 +0200 Subject: s3-rpc_server: Fixed debug messages of srv_pipe_hnd. --- source3/rpc_server/srv_pipe_hnd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/rpc_server/srv_pipe_hnd.c') diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index 1c7363299a..501bb1efc7 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -280,7 +280,7 @@ static ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, } DEBUG(6,(" name: %s len: %u\n", - get_pipe_name_from_syntax(talloc_tos(), &p->syntax), + get_pipe_name_from_syntax(talloc_tos(), &p->contexts->syntax), (unsigned int)n)); /* @@ -298,7 +298,7 @@ static ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, DEBUG(5,("read_from_pipe: too large read (%u) requested on " "pipe %s. We can only service %d sized reads.\n", (unsigned int)n, - get_pipe_name_from_syntax(talloc_tos(), &p->syntax), + get_pipe_name_from_syntax(talloc_tos(), &p->contexts->syntax), RPC_MAX_PDU_FRAG_LEN )); n = RPC_MAX_PDU_FRAG_LEN; } @@ -319,7 +319,7 @@ static ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, DEBUG(10,("read_from_pipe: %s: current_pdu_len = %u, " "current_pdu_sent = %u returning %d bytes.\n", - get_pipe_name_from_syntax(talloc_tos(), &p->syntax), + get_pipe_name_from_syntax(talloc_tos(), &p->contexts->syntax), (unsigned int)p->out_data.frag.length, (unsigned int)p->out_data.current_pdu_sent, (int)data_returned)); @@ -340,7 +340,7 @@ static ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, DEBUG(10,("read_from_pipe: %s: fault_state = %d : data_sent_length " "= %u, p->out_data.rdata.length = %u.\n", - get_pipe_name_from_syntax(talloc_tos(), &p->syntax), + get_pipe_name_from_syntax(talloc_tos(), &p->contexts->syntax), (int)p->fault_state, (unsigned int)p->out_data.data_sent_length, (unsigned int)p->out_data.rdata.length)); @@ -362,7 +362,7 @@ static ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, if(!create_next_pdu(p)) { DEBUG(0,("read_from_pipe: %s: create_next_pdu failed.\n", - get_pipe_name_from_syntax(talloc_tos(), &p->syntax))); + get_pipe_name_from_syntax(talloc_tos(), &p->contexts->syntax))); return -1; } -- cgit