summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2013-09-18 10:58:16 +0200
committerGünther Deschner <gd@samba.org>2013-09-20 13:07:16 +0200
commit3135533710b2a1b64aaf6b10d30b86f3c004657d (patch)
tree95020a93e1feebb822956f8dac480c7ee6ea8b5a
parenta94e278883c58b35d383753e86135ff6a1d14ec7 (diff)
downloadsamba-3135533710b2a1b64aaf6b10d30b86f3c004657d.tar.gz
samba-3135533710b2a1b64aaf6b10d30b86f3c004657d.tar.bz2
samba-3135533710b2a1b64aaf6b10d30b86f3c004657d.zip
s3-rpc: use ndr_interface_name() instead of get_pipe_name_from_syntax() in DEBUG.
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source3/rpc_server/rpc_handles.c15
-rw-r--r--source3/rpc_server/srv_pipe.c22
-rw-r--r--source3/rpc_server/srv_pipe_hnd.c16
-rwxr-xr-xsource3/wscript_build3
4 files changed, 36 insertions, 20 deletions
diff --git a/source3/rpc_server/rpc_handles.c b/source3/rpc_server/rpc_handles.c
index 70c3919e61..409299abce 100644
--- a/source3/rpc_server/rpc_handles.c
+++ b/source3/rpc_server/rpc_handles.c
@@ -27,6 +27,7 @@
#include "rpc_server/rpc_pipes.h"
#include "../libcli/security/security.h"
#include "lib/tsocket/tsocket.h"
+#include "librpc/ndr/ndr_table.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
@@ -218,7 +219,8 @@ bool init_pipe_handles(struct pipes_struct *p, const struct ndr_syntax_id *synta
DEBUG(10,("init_pipe_handle_list: created handle list for "
"pipe %s\n",
- get_pipe_name_from_syntax(talloc_tos(), syntax)));
+ ndr_interface_name(&syntax->uuid,
+ syntax->if_version)));
}
/*
@@ -235,7 +237,7 @@ bool init_pipe_handles(struct pipes_struct *p, const struct ndr_syntax_id *synta
DEBUG(10,("init_pipe_handle_list: pipe_handles ref count = %lu for "
"pipe %s\n", (unsigned long)p->pipe_handles->pipe_ref_count,
- get_pipe_name_from_syntax(talloc_tos(), syntax)));
+ ndr_interface_name(&syntax->uuid, syntax->if_version)));
return True;
}
@@ -412,8 +414,8 @@ void close_policy_by_pipe(struct pipes_struct *p)
TALLOC_FREE(p->pipe_handles);
DEBUG(10,("Deleted handle list for RPC connection %s\n",
- get_pipe_name_from_syntax(talloc_tos(),
- &p->contexts->syntax)));
+ ndr_interface_name(&p->contexts->syntax.uuid,
+ p->contexts->syntax.if_version)));
}
}
@@ -456,8 +458,9 @@ void *_policy_handle_create(struct pipes_struct *p, struct policy_handle *hnd,
if (p->pipe_handles->count > MAX_OPEN_POLS) {
DEBUG(0, ("ERROR: Too many handles (%d) for RPC connection %s\n",
(int) p->pipe_handles->count,
- get_pipe_name_from_syntax(talloc_tos(),
- &p->contexts->syntax)));
+ ndr_interface_name(&p->contexts->syntax.uuid,
+ p->contexts->syntax.if_version)));
+
*pstatus = NT_STATUS_INSUFFICIENT_RESOURCES;
return NULL;
}
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index c46c98acc1..0807405743 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -41,6 +41,7 @@
#include "rpc_server/srv_pipe.h"
#include "rpc_server/rpc_contexts.h"
#include "lib/param/param.h"
+#include "librpc/ndr/ndr_table.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
@@ -336,7 +337,8 @@ static bool check_bind_req(struct pipes_struct *p,
bool ok;
DEBUG(3,("check_bind_req for %s\n",
- get_pipe_name_from_syntax(talloc_tos(), abstract)));
+ ndr_interface_name(&abstract->uuid,
+ abstract->if_version)));
/* we have to check all now since win2k introduced a new UUID on the lsaprpc pipe */
if (rpc_srv_pipe_exists_by_id(abstract) &&
@@ -580,7 +582,8 @@ static bool api_pipe_bind_req(struct pipes_struct *p,
if (NT_STATUS_IS_ERR(status)) {
DEBUG(3,("api_pipe_bind_req: Unknown rpc service name "
"%s in bind request.\n",
- get_pipe_name_from_syntax(talloc_tos(), &id)));
+ ndr_interface_name(&id.uuid,
+ id.if_version)));
return setup_bind_nak(p, pkt);
}
@@ -595,8 +598,10 @@ static bool api_pipe_bind_req(struct pipes_struct *p,
} else {
DEBUG(0, ("module %s doesn't provide functions for "
"pipe %s!\n",
- get_pipe_name_from_syntax(talloc_tos(), &id),
- get_pipe_name_from_syntax(talloc_tos(), &id)));
+ ndr_interface_name(&id.uuid,
+ id.if_version),
+ ndr_interface_name(&id.uuid,
+ id.if_version)));
return setup_bind_nak(p, pkt);
}
}
@@ -1206,7 +1211,8 @@ static bool api_pipe_request(struct pipes_struct *p,
TALLOC_CTX *frame = talloc_stackframe();
DEBUG(5, ("Requested %s rpc service\n",
- get_pipe_name_from_syntax(talloc_tos(), &pipe_fns->syntax)));
+ ndr_interface_name(&pipe_fns->syntax.uuid,
+ pipe_fns->syntax.if_version)));
ret = api_rpcTNP(p, pkt, pipe_fns->cmds, pipe_fns->n_cmds,
&pipe_fns->syntax);
@@ -1237,7 +1243,7 @@ static bool api_rpcTNP(struct pipes_struct *p, struct ncacn_packet *pkt,
/* interpret the command */
DEBUG(4,("api_rpcTNP: %s op 0x%x - ",
- get_pipe_name_from_syntax(talloc_tos(), syntax),
+ ndr_interface_name(&syntax->uuid, syntax->if_version),
pkt->u.request.opnum));
if (DEBUGLEVEL >= 50) {
@@ -1276,7 +1282,7 @@ static bool api_rpcTNP(struct pipes_struct *p, struct ncacn_packet *pkt,
/* do the actual command */
if(!api_rpc_cmds[fn_num].fn(p)) {
DEBUG(0,("api_rpcTNP: %s: %s failed.\n",
- get_pipe_name_from_syntax(talloc_tos(), syntax),
+ ndr_interface_name(&syntax->uuid, syntax->if_version),
api_rpc_cmds[fn_num].name));
data_blob_free(&p->out_data.rdata);
return False;
@@ -1299,7 +1305,7 @@ static bool api_rpcTNP(struct pipes_struct *p, struct ncacn_packet *pkt,
}
DEBUG(5,("api_rpcTNP: called %s successfully\n",
- get_pipe_name_from_syntax(talloc_tos(), syntax)));
+ ndr_interface_name(&syntax->uuid, syntax->if_version)));
/* Check for buffer underflow in rpc parsing */
if ((DEBUGLEVEL >= 10) &&
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c
index 3f8ff44767..fcbfa77c7b 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_config.h"
#include "../lib/tsocket/tsocket.h"
#include "../lib/util/tevent_ntstatus.h"
+#include "librpc/ndr/ndr_table.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
@@ -281,7 +282,8 @@ 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->contexts->syntax),
+ ndr_interface_name(&p->contexts->syntax.uuid,
+ p->contexts->syntax.if_version),
(unsigned int)n));
/*
@@ -299,7 +301,8 @@ 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->contexts->syntax),
+ ndr_interface_name(&p->contexts->syntax.uuid,
+ p->contexts->syntax.if_version),
RPC_MAX_PDU_FRAG_LEN ));
n = RPC_MAX_PDU_FRAG_LEN;
}
@@ -320,7 +323,8 @@ 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->contexts->syntax),
+ ndr_interface_name(&p->contexts->syntax.uuid,
+ p->contexts->syntax.if_version),
(unsigned int)p->out_data.frag.length,
(unsigned int)p->out_data.current_pdu_sent,
(int)data_returned));
@@ -341,7 +345,8 @@ 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->contexts->syntax),
+ ndr_interface_name(&p->contexts->syntax.uuid,
+ p->contexts->syntax.if_version),
(int)p->fault_state,
(unsigned int)p->out_data.data_sent_length,
(unsigned int)p->out_data.rdata.length));
@@ -363,7 +368,8 @@ 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->contexts->syntax)));
+ ndr_interface_name(&p->contexts->syntax.uuid,
+ p->contexts->syntax.if_version)));
return -1;
}
diff --git a/source3/wscript_build b/source3/wscript_build
index e4417eaa0d..7a12f17cd8 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -672,7 +672,8 @@ bld.SAMBA3_LIBRARY('msrpc3',
deps='''ndr ndr-standard
RPC_NDR_EPMAPPER NTLMSSP_COMMON COMMON_SCHANNEL LIBCLI_AUTH
LIBTSOCKET gse dcerpc-binding
- libsmb''',
+ libsmb
+ ndr-table''',
vars=locals(),
private_library=True)