summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_lsa_hnd.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-02-01 12:03:31 +0100
committerVolker Lendecke <vl@samba.org>2009-02-01 14:34:23 +0100
commit53394980ad7dc09af4412a6c4ee75241798b0e7c (patch)
tree1bdfb1fb7ed75738afdb46825dc0c75d54027a9c /source3/rpc_server/srv_lsa_hnd.c
parent3cd8c121dc27739a9a70bf47e32dcd19e35ddf14 (diff)
downloadsamba-53394980ad7dc09af4412a6c4ee75241798b0e7c.tar.gz
samba-53394980ad7dc09af4412a6c4ee75241798b0e7c.tar.bz2
samba-53394980ad7dc09af4412a6c4ee75241798b0e7c.zip
Replace pipe names in pipes_struct by ndr_syntax_id
This was mainly used for debugging output
Diffstat (limited to 'source3/rpc_server/srv_lsa_hnd.c')
-rw-r--r--source3/rpc_server/srv_lsa_hnd.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/source3/rpc_server/srv_lsa_hnd.c b/source3/rpc_server/srv_lsa_hnd.c
index 5f7c8d9f1a..2779b8aa18 100644
--- a/source3/rpc_server/srv_lsa_hnd.c
+++ b/source3/rpc_server/srv_lsa_hnd.c
@@ -34,9 +34,10 @@
pipe is open. JRA.
****************************************************************************/
-static bool is_samr_lsa_pipe(const char *pipe_name)
+static bool is_samr_lsa_pipe(const struct ndr_syntax_id *syntax)
{
- return (strstr(pipe_name, "samr") || strstr(pipe_name, "lsa"));
+ return (ndr_syntax_id_equal(syntax, &ndr_table_samr.syntax_id)
+ || ndr_syntax_id_equal(syntax, &ndr_table_lsarpc.syntax_id));
}
/****************************************************************************
@@ -44,7 +45,7 @@ static bool is_samr_lsa_pipe(const char *pipe_name)
pipes of the same name.
****************************************************************************/
-bool init_pipe_handle_list(pipes_struct *p, const char *pipe_name)
+bool init_pipe_handle_list(pipes_struct *p, const struct ndr_syntax_id *syntax)
{
pipes_struct *plist;
struct handle_list *hl;
@@ -52,11 +53,11 @@ bool init_pipe_handle_list(pipes_struct *p, const char *pipe_name)
for (plist = get_first_internal_pipe();
plist;
plist = get_next_internal_pipe(plist)) {
- if (strequal(plist->name, pipe_name)) {
+ if (ndr_syntax_id_equal(syntax, &plist->syntax)) {
break;
}
- if (is_samr_lsa_pipe(plist->name)
- && is_samr_lsa_pipe(pipe_name)) {
+ if (is_samr_lsa_pipe(&plist->syntax)
+ && is_samr_lsa_pipe(syntax)) {
/*
* samr and lsa share a handle space (same process
* under Windows?)
@@ -80,7 +81,8 @@ bool init_pipe_handle_list(pipes_struct *p, const char *pipe_name)
}
ZERO_STRUCTP(hl);
- DEBUG(10,("init_pipe_handles: created handle list for pipe %s\n", pipe_name ));
+ DEBUG(10,("init_pipe_handles: created handle list for "
+ "pipe %s\n", get_pipe_name_from_iface(syntax)));
}
/*
@@ -96,7 +98,8 @@ bool init_pipe_handle_list(pipes_struct *p, const char *pipe_name)
p->pipe_handles = hl;
DEBUG(10,("init_pipe_handles: pipe_handles ref count = %lu for pipe %s\n",
- (unsigned long)p->pipe_handles->pipe_ref_count, pipe_name ));
+ (unsigned long)p->pipe_handles->pipe_ref_count,
+ get_pipe_name_from_iface(syntax)));
return True;
}
@@ -242,7 +245,8 @@ void close_policy_by_pipe(pipes_struct *p)
p->pipe_handles->count = 0;
SAFE_FREE(p->pipe_handles);
- DEBUG(10,("close_policy_by_pipe: deleted handle list for pipe %s\n", p->name ));
+ DEBUG(10,("close_policy_by_pipe: deleted handle list for "
+ "pipe %s\n", get_pipe_name_from_iface(&p->syntax)));
}
}