diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-02-05 16:39:28 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-02-05 16:39:28 +0100 |
commit | 6d139ca4680abcbda5110f2f0886aa038ff62088 (patch) | |
tree | 7d61db40fb058bcbf08ccd8e0dadc365b819371b /source3/rpc_server/srv_lsa_hnd.c | |
parent | 4a9b3052caeb8bb144803b49dcfae82395172bc3 (diff) | |
parent | afa960cbbcd609123d710c301e7a9a070c1fed70 (diff) | |
download | samba-6d139ca4680abcbda5110f2f0886aa038ff62088.tar.gz samba-6d139ca4680abcbda5110f2f0886aa038ff62088.tar.bz2 samba-6d139ca4680abcbda5110f2f0886aa038ff62088.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Conflicts:
librpc/ndr.pc.in
Diffstat (limited to 'source3/rpc_server/srv_lsa_hnd.c')
-rw-r--r-- | source3/rpc_server/srv_lsa_hnd.c | 22 |
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))); } } |