The branch, master has been updated
       via  cd16e38... s3: Register the ndr_interfaces dynamically
       via  268df12... s3: Get rid of a NULL terminator
       via  a32c425f.. s3: Get rid of explicit pipe names
       via  2aa0af9... s3: get_pipe_name_from_iface -> get_pipe_name_from_syntax
      from  bd2ffb1... Fix bug 6865 - acl_xattr module: Has dependency that 
inherit acls = yes or xattrs are removed. Jeremy.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit cd16e38e32013c8abb872c179c7f8bf33c92ed25
Author: Volker Lendecke <[email protected]>
Date:   Sun Nov 1 12:05:14 2009 +0100

    s3: Register the ndr_interfaces dynamically

commit 268df12ab6b60052d4f5e8ff723f2528ace0dbfb
Author: Volker Lendecke <[email protected]>
Date:   Sun Nov 1 11:33:59 2009 +0100

    s3: Get rid of a NULL terminator

commit a32c425f91dc28460fa928ba6f5b9331aba03d23
Author: Volker Lendecke <[email protected]>
Date:   Sat Oct 31 20:04:54 2009 +0100

    s3: Get rid of explicit pipe names

commit 2aa0af98677389359ee004c8b0030ab4faf0da98
Author: Volker Lendecke <[email protected]>
Date:   Sat Oct 31 19:28:16 2009 +0100

    s3: get_pipe_name_from_iface -> get_pipe_name_from_syntax

-----------------------------------------------------------------------

Summary of changes:
 source3/include/proto.h               |    6 +-
 source3/lib/netapi/cm.c               |    2 +-
 source3/rpc_client/cli_pipe.c         |  209 +++++++++++++++++++++++----------
 source3/rpc_client/rpc_transport_np.c |    4 +-
 source3/rpc_server/srv_lsa_hnd.c      |   10 +-
 source3/rpc_server/srv_pipe.c         |   44 +++++---
 source3/rpc_server/srv_pipe_hnd.c     |   53 +++++---
 source3/rpcclient/rpcclient.c         |   10 +-
 source3/utils/net_rpc.c               |    3 +-
 9 files changed, 226 insertions(+), 115 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 49d0100..e57ffdd 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5703,7 +5703,11 @@ bool prs_data_blob(prs_struct *prs, DATA_BLOB *blob, 
TALLOC_CTX *mem_ctx);
 
 /* The following definitions come from rpc_parse/parse_rpc.c  */
 
-const char *get_pipe_name_from_iface(const struct ndr_syntax_id *interface);
+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);
 void init_rpc_hdr(RPC_HDR *hdr, enum dcerpc_pkt_type pkt_type, uint8 flags,
                                uint32 call_id, int data_len, int auth_len);
 bool smb_io_rpc_hdr(const char *desc,  RPC_HDR *rpc, prs_struct *ps, int 
depth);
diff --git a/source3/lib/netapi/cm.c b/source3/lib/netapi/cm.c
index 55f5350..9baba7b 100644
--- a/source3/lib/netapi/cm.c
+++ b/source3/lib/netapi/cm.c
@@ -199,7 +199,7 @@ WERROR libnetapi_open_pipe(struct libnetapi_ctx *ctx,
        status = pipe_cm_open(ctx, cli, interface, &result);
        if (!NT_STATUS_IS_OK(status)) {
                libnetapi_set_error_string(ctx, "failed to open PIPE %s: %s",
-                       get_pipe_name_from_iface(interface),
+                       get_pipe_name_from_syntax(talloc_tos(), interface),
                        get_friendly_nt_error_msg(status));
                return WERR_DEST_NOT_FOUND;
        }
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index c649870..9ff84f8 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -28,73 +28,151 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_RPC_CLI
 
-/*******************************************************************
-interface/version dce/rpc pipe identification
-********************************************************************/
-
-#define PIPE_SRVSVC   "\\PIPE\\srvsvc"
-#define PIPE_SAMR     "\\PIPE\\samr"
-#define PIPE_WINREG   "\\PIPE\\winreg"
-#define PIPE_WKSSVC   "\\PIPE\\wkssvc"
-#define PIPE_NETLOGON "\\PIPE\\NETLOGON"
-#define PIPE_NTLSA    "\\PIPE\\ntlsa"
-#define PIPE_NTSVCS   "\\PIPE\\ntsvcs"
-#define PIPE_LSASS    "\\PIPE\\lsass"
-#define PIPE_LSARPC   "\\PIPE\\lsarpc"
-#define PIPE_SPOOLSS  "\\PIPE\\spoolss"
-#define PIPE_NETDFS   "\\PIPE\\netdfs"
-#define PIPE_ECHO     "\\PIPE\\rpcecho"
-#define PIPE_SHUTDOWN "\\PIPE\\initshutdown"
-#define PIPE_EPM      "\\PIPE\\epmapper"
-#define PIPE_SVCCTL   "\\PIPE\\svcctl"
-#define PIPE_EVENTLOG "\\PIPE\\eventlog"
-#define PIPE_EPMAPPER "\\PIPE\\epmapper"
-#define PIPE_DRSUAPI  "\\PIPE\\drsuapi"
+static const char *get_pipe_name_from_iface(
+       TALLOC_CTX *mem_ctx, const struct ndr_interface_table *interface)
+{
+       int i;
+       const struct ndr_interface_string_array *ep = interface->endpoints;
+       char *p;
 
-/*
- * IMPORTANT!!  If you update this structure, make sure to
- * update the index #defines in smb.h.
- */
+       for (i=0; i<ep->count; i++) {
+               if (strncmp(ep->names[i], "ncacn_np:[\\pipe\\", 16) == 0) {
+                       break;
+               }
+       }
+       if (i == ep->count) {
+               return NULL;
+       }
 
-static const struct pipe_id_info {
-       /* the names appear not to matter: the syntaxes _do_ matter */
+       /*
+        * extract the pipe name without \\pipe from for example
+        * ncacn_np:[\\pipe\\epmapper]
+        */
+       p = strchr(ep->names[i]+15, ']');
+       if (p == NULL) {
+               return "PIPE";
+       }
+       return talloc_strndup(mem_ctx, ep->names[i]+15, p - ep->names[i] - 15);
+}
 
-       const char *client_pipe;
-       const struct ndr_syntax_id *abstr_syntax; /* this one is the abstract 
syntax id */
-} pipe_names [] =
+static const struct ndr_interface_table **interfaces;
+
+bool smb_register_ndr_interface(const struct ndr_interface_table *interface)
 {
-       { PIPE_LSARPC,          &ndr_table_lsarpc.syntax_id },
-       { PIPE_LSARPC,          &ndr_table_dssetup.syntax_id },
-       { PIPE_SAMR,            &ndr_table_samr.syntax_id },
-       { PIPE_NETLOGON,        &ndr_table_netlogon.syntax_id },
-       { PIPE_SRVSVC,          &ndr_table_srvsvc.syntax_id },
-       { PIPE_WKSSVC,          &ndr_table_wkssvc.syntax_id },
-       { PIPE_WINREG,          &ndr_table_winreg.syntax_id },
-       { PIPE_SPOOLSS,         &ndr_table_spoolss.syntax_id },
-       { PIPE_NETDFS,          &ndr_table_netdfs.syntax_id },
-       { PIPE_ECHO,            &ndr_table_rpcecho.syntax_id },
-       { PIPE_SHUTDOWN,        &ndr_table_initshutdown.syntax_id },
-       { PIPE_SVCCTL,          &ndr_table_svcctl.syntax_id },
-       { PIPE_EVENTLOG,        &ndr_table_eventlog.syntax_id },
-       { PIPE_NTSVCS,          &ndr_table_ntsvcs.syntax_id },
-       { PIPE_EPMAPPER,        &ndr_table_epmapper.syntax_id },
-       { PIPE_DRSUAPI,         &ndr_table_drsuapi.syntax_id },
-       { NULL, NULL }
-};
+       int num_interfaces = talloc_array_length(interfaces);
+       const struct ndr_interface_table **tmp;
+       int i;
+
+       for (i=0; i<num_interfaces; i++) {
+               if (ndr_syntax_id_equal(&interfaces[i]->syntax_id,
+                                       &interface->syntax_id)) {
+                       return true;
+               }
+       }
+
+       tmp = talloc_realloc(NULL, interfaces,
+                            const struct ndr_interface_table *,
+                            num_interfaces + 1);
+       if (tmp == NULL) {
+               DEBUG(1, ("smb_register_ndr_interface: talloc failed\n"));
+               return false;
+       }
+       interfaces = tmp;
+       interfaces[num_interfaces] = interface;
+       return true;
+}
+
+static bool initialize_interfaces(void)
+{
+       if (!smb_register_ndr_interface(&ndr_table_lsarpc)) {
+               return false;
+       }
+       if (!smb_register_ndr_interface(&ndr_table_dssetup)) {
+               return false;
+       }
+       if (!smb_register_ndr_interface(&ndr_table_samr)) {
+               return false;
+       }
+       if (!smb_register_ndr_interface(&ndr_table_netlogon)) {
+               return false;
+       }
+       if (!smb_register_ndr_interface(&ndr_table_srvsvc)) {
+               return false;
+       }
+       if (!smb_register_ndr_interface(&ndr_table_wkssvc)) {
+               return false;
+       }
+       if (!smb_register_ndr_interface(&ndr_table_winreg)) {
+               return false;
+       }
+       if (!smb_register_ndr_interface(&ndr_table_spoolss)) {
+               return false;
+       }
+       if (!smb_register_ndr_interface(&ndr_table_netdfs)) {
+               return false;
+       }
+       if (!smb_register_ndr_interface(&ndr_table_rpcecho)) {
+               return false;
+       }
+       if (!smb_register_ndr_interface(&ndr_table_initshutdown)) {
+               return false;
+       }
+       if (!smb_register_ndr_interface(&ndr_table_svcctl)) {
+               return false;
+       }
+       if (!smb_register_ndr_interface(&ndr_table_eventlog)) {
+               return false;
+       }
+       if (!smb_register_ndr_interface(&ndr_table_ntsvcs)) {
+               return false;
+       }
+       if (!smb_register_ndr_interface(&ndr_table_epmapper)) {
+               return false;
+       }
+       if (!smb_register_ndr_interface(&ndr_table_drsuapi)) {
+               return false;
+       }
+       return true;
+}
+
+const struct ndr_interface_table *get_iface_from_syntax(
+       const struct ndr_syntax_id *syntax)
+{
+       int num_interfaces;
+       int i;
+
+       if (interfaces == NULL) {
+               if (!initialize_interfaces()) {
+                       return NULL;
+               }
+       }
+       num_interfaces = talloc_array_length(interfaces);
+
+       for (i=0; i<num_interfaces; i++) {
+               if (ndr_syntax_id_equal(&interfaces[i]->syntax_id, syntax)) {
+                       return interfaces[i];
+               }
+       }
+
+       return NULL;
+}
 
 /****************************************************************************
  Return the pipe name from the interface.
  ****************************************************************************/
 
-const char *get_pipe_name_from_iface(const struct ndr_syntax_id *interface)
+const char *get_pipe_name_from_syntax(TALLOC_CTX *mem_ctx,
+                                     const struct ndr_syntax_id *syntax)
 {
+       const struct ndr_interface_table *interface;
        char *guid_str;
        const char *result;
-       int i;
-       for (i = 0; pipe_names[i].client_pipe; i++) {
-               if (ndr_syntax_id_equal(pipe_names[i].abstr_syntax,
-                                       interface)) {
-                       return &pipe_names[i].client_pipe[5];
+
+       interface = get_iface_from_syntax(syntax);
+       if (interface != NULL) {
+               result = get_pipe_name_from_iface(mem_ctx, interface);
+               if (result != NULL) {
+                       return result;
                }
        }
 
@@ -103,12 +181,12 @@ const char *get_pipe_name_from_iface(const struct 
ndr_syntax_id *interface)
         * interested in the known pipes mentioned in pipe_names[]
         */
 
-       guid_str = GUID_string(talloc_tos(), &interface->uuid);
+       guid_str = GUID_string(talloc_tos(), &syntax->uuid);
        if (guid_str == NULL) {
                return NULL;
        }
-       result = talloc_asprintf(talloc_tos(), "Interface %s.%d", guid_str,
-                                (int)interface->if_version);
+       result = talloc_asprintf(mem_ctx, "Interface %s.%d", guid_str,
+                                (int)syntax->if_version);
        TALLOC_FREE(guid_str);
 
        if (result == NULL) {
@@ -3683,7 +3761,7 @@ NTSTATUS cli_rpc_pipe_open_noauth_transport(struct 
cli_state *cli,
                }
                DEBUG(lvl, ("cli_rpc_pipe_open_noauth: rpc_pipe_bind for pipe "
                            "%s failed with error %s\n",
-                           get_pipe_name_from_iface(interface),
+                           get_pipe_name_from_syntax(talloc_tos(), interface),
                            nt_errstr(status) ));
                TALLOC_FREE(result);
                return status;
@@ -3691,7 +3769,8 @@ NTSTATUS cli_rpc_pipe_open_noauth_transport(struct 
cli_state *cli,
 
        DEBUG(10,("cli_rpc_pipe_open_noauth: opened pipe %s to machine "
                  "%s and bound anonymously.\n",
-                 get_pipe_name_from_iface(interface), cli->desthost));
+                 get_pipe_name_from_syntax(talloc_tos(), interface),
+                 cli->desthost));
 
        *presult = result;
        return NT_STATUS_OK;
@@ -3749,8 +3828,8 @@ static NTSTATUS cli_rpc_pipe_open_ntlmssp_internal(struct 
cli_state *cli,
 
        DEBUG(10,("cli_rpc_pipe_open_ntlmssp_internal: opened pipe %s to "
                "machine %s and bound NTLMSSP as user %s\\%s.\n",
-                 get_pipe_name_from_iface(interface), cli->desthost, domain,
-                 username ));
+                 get_pipe_name_from_syntax(talloc_tos(), interface),
+                 cli->desthost, domain, username ));
 
        *presult = result;
        return NT_STATUS_OK;
@@ -3943,7 +4022,7 @@ NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct 
cli_state *cli,
 
        DEBUG(10,("cli_rpc_pipe_open_schannel_with_key: opened pipe %s to 
machine %s "
                  "for domain %s and bound using schannel.\n",
-                 get_pipe_name_from_iface(interface),
+                 get_pipe_name_from_syntax(talloc_tos(), interface),
                  cli->desthost, domain ));
 
        *presult = result;
diff --git a/source3/rpc_client/rpc_transport_np.c 
b/source3/rpc_client/rpc_transport_np.c
index 73d23d8..c28664d 100644
--- a/source3/rpc_client/rpc_transport_np.c
+++ b/source3/rpc_client/rpc_transport_np.c
@@ -301,8 +301,8 @@ struct tevent_req *rpc_transport_np_init_send(TALLOC_CTX 
*mem_ctx,
        }
        state->transport->priv = state->transport_np;
 
-       state->transport_np->pipe_name = get_pipe_name_from_iface(
-               abstract_syntax);
+       state->transport_np->pipe_name = get_pipe_name_from_syntax(
+               state->transport_np, abstract_syntax);
        state->transport_np->cli = cli;
 
        subreq = cli_ntcreate_send(
diff --git a/source3/rpc_server/srv_lsa_hnd.c b/source3/rpc_server/srv_lsa_hnd.c
index 94e73fb..6951646 100644
--- a/source3/rpc_server/srv_lsa_hnd.c
+++ b/source3/rpc_server/srv_lsa_hnd.c
@@ -110,7 +110,8 @@ bool init_pipe_handle_list(pipes_struct *p, const struct 
ndr_syntax_id *syntax)
                ZERO_STRUCTP(hl);
 
                DEBUG(10,("init_pipe_handles: created handle list for "
-                         "pipe %s\n", get_pipe_name_from_iface(syntax)));
+                         "pipe %s\n",
+                         get_pipe_name_from_syntax(talloc_tos(), syntax)));
        }
 
        /*
@@ -127,7 +128,7 @@ bool init_pipe_handle_list(pipes_struct *p, const struct 
ndr_syntax_id *syntax)
 
        DEBUG(10,("init_pipe_handles: pipe_handles ref count = %lu for pipe 
%s\n",
                  (unsigned long)p->pipe_handles->pipe_ref_count,
-                 get_pipe_name_from_iface(syntax)));
+                 get_pipe_name_from_syntax(talloc_tos(), syntax)));
 
        return True;
 }
@@ -285,7 +286,8 @@ void close_policy_by_pipe(pipes_struct *p)
 
                SAFE_FREE(p->pipe_handles);
                DEBUG(10,("close_policy_by_pipe: deleted handle list for "
-                         "pipe %s\n", get_pipe_name_from_iface(&p->syntax)));
+                         "pipe %s\n",
+                         get_pipe_name_from_syntax(talloc_tos(), &p->syntax)));
        }
 }
 
@@ -327,7 +329,7 @@ void *_policy_handle_create(struct pipes_struct *p, struct 
policy_handle *hnd,
        if (p->pipe_handles->count > MAX_OPEN_POLS) {
                DEBUG(0, ("policy_handle_create: ERROR: too many handles (%d) "
                          "on pipe %s.\n", (int)p->pipe_handles->count,
-                         get_pipe_name_from_iface(&p->syntax)));
+                         get_pipe_name_from_syntax(talloc_tos(), &p->syntax)));
                *pstatus = NT_STATUS_INSUFFICIENT_RESOURCES;
                return NULL;
        }
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index a246b6d..90eb4f9 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -647,7 +647,7 @@ static bool pipe_ntlmssp_verify_final(pipes_struct *p, 
DATA_BLOB *p_resp_blob)
        bool ret;
 
        DEBUG(5,("pipe_ntlmssp_verify_final: pipe %s checking user details\n",
-                get_pipe_name_from_iface(&p->syntax)));
+                get_pipe_name_from_syntax(talloc_tos(), &p->syntax)));
 
        ZERO_STRUCT(reply);
 
@@ -671,7 +671,8 @@ static bool pipe_ntlmssp_verify_final(pipes_struct *p, 
DATA_BLOB *p_resp_blob)
                if (!(a->ntlmssp_state->neg_flags & NTLMSSP_NEGOTIATE_SIGN)) {
                        DEBUG(0,("pipe_ntlmssp_verify_final: pipe %s : packet 
integrity requested "
                                "but client declined signing.\n",
-                               get_pipe_name_from_iface(&p->syntax)));
+                                get_pipe_name_from_syntax(talloc_tos(),
+                                                          &p->syntax)));
                        return False;
                }
        }
@@ -679,7 +680,8 @@ static bool pipe_ntlmssp_verify_final(pipes_struct *p, 
DATA_BLOB *p_resp_blob)
                if (!(a->ntlmssp_state->neg_flags & NTLMSSP_NEGOTIATE_SEAL)) {
                        DEBUG(0,("pipe_ntlmssp_verify_final: pipe %s : packet 
privacy requested "
                                "but client declined sealing.\n",
-                               get_pipe_name_from_iface(&p->syntax)));
+                                get_pipe_name_from_syntax(talloc_tos(),
+                                                          &p->syntax)));
                        return False;
                }
        }
@@ -995,7 +997,7 @@ static bool check_bind_req(struct pipes_struct *p,
        struct pipe_rpc_fns *context_fns;
 
        DEBUG(3,("check_bind_req for %s\n",
-                get_pipe_name_from_iface(&p->syntax)));
+                get_pipe_name_from_syntax(talloc_tos(), &p->syntax)));
 
        /* we have to check all now since win2k introduced a new UUID on the 
lsaprpc pipe */
 
@@ -1607,7 +1609,8 @@ bool api_pipe_bind_req(pipes_struct *p, prs_struct 
*rpc_in_p)
        /* No rebinds on a bound pipe - use alter context. */
        if (p->pipe_bound) {
                DEBUG(2,("api_pipe_bind_req: rejecting bind request on bound "
-                        "pipe %s.\n", get_pipe_name_from_iface(&p->syntax)));
+                        "pipe %s.\n",
+                        get_pipe_name_from_syntax(talloc_tos(), &p->syntax)));
                return setup_bind_nak(p);
        }
 
@@ -1672,12 +1675,15 @@ bool api_pipe_bind_req(pipes_struct *p, prs_struct 
*rpc_in_p)
                NTSTATUS status;
 
                status = smb_probe_module(
-                       "rpc", get_pipe_name_from_iface(
+                       "rpc", get_pipe_name_from_syntax(
+                               talloc_tos(),
                                &hdr_rb.rpc_context[0].abstract));
 
                if (NT_STATUS_IS_ERR(status)) {
                        DEBUG(3,("api_pipe_bind_req: Unknown pipe name %s in 
bind request.\n",
-                                
get_pipe_name_from_iface(&hdr_rb.rpc_context[0].abstract)));
+                                get_pipe_name_from_syntax(
+                                       talloc_tos(),
+                                       &hdr_rb.rpc_context[0].abstract)));
                        prs_mem_free(&p->out_data.frag);
                        prs_mem_free(&out_hdr_ba);
                        prs_mem_free(&out_auth);
@@ -1687,7 +1693,8 @@ bool api_pipe_bind_req(pipes_struct *p, prs_struct 
*rpc_in_p)
 
                 for (i = 0; i < rpc_lookup_size; i++) {
                        if (strequal(rpc_lookup[i].pipe.clnt,
-                                   get_pipe_name_from_iface(&p->syntax))) {
+                                   get_pipe_name_from_syntax(talloc_tos(),
+                                                             &p->syntax))) {
                                DEBUG(3, ("api_pipe_bind_req: \\PIPE\\%s -> 
\\PIPE\\%s\n",
                                          rpc_lookup[i].pipe.clnt, 
rpc_lookup[i].pipe.srv));
                                break;
@@ -1697,8 +1704,10 @@ bool api_pipe_bind_req(pipes_struct *p, prs_struct 
*rpc_in_p)
                if (i == rpc_lookup_size) {
                        DEBUG(0, ("module %s doesn't provide functions for "
                                  "pipe %s!\n",
-                                 get_pipe_name_from_iface(&p->syntax),
-                                 get_pipe_name_from_iface(&p->syntax)));
+                                 get_pipe_name_from_syntax(talloc_tos(),
+                                                           &p->syntax),
+                                 get_pipe_name_from_syntax(talloc_tos(),
+                                                           &p->syntax)));
                        goto err_exit;
                }
        }
@@ -2356,7 +2365,7 @@ bool api_pipe_request(pipes_struct *p)
        }
 
        DEBUG(5, ("Requested \\PIPE\\%s\n",
-                 get_pipe_name_from_iface(&p->syntax)));
+                 get_pipe_name_from_syntax(talloc_tos(), &p->syntax)));
 
        /* get the set of RPC functions for this context */
 
@@ -2370,7 +2379,7 @@ bool api_pipe_request(pipes_struct *p)
        else {
                DEBUG(0,("api_pipe_request: No rpc function table associated 
with context [%d] on pipe [%s]\n",
                        p->hdr_req.context_id,
-                       get_pipe_name_from_iface(&p->syntax)));
+                        get_pipe_name_from_syntax(talloc_tos(), &p->syntax)));
        }
 
        if (changed_user) {
@@ -2392,12 +2401,13 @@ static bool api_rpcTNP(pipes_struct *p,
 
        /* interpret the command */
        DEBUG(4,("api_rpcTNP: %s op 0x%x - ",
-                get_pipe_name_from_iface(&p->syntax), p->hdr_req.opnum));
+                get_pipe_name_from_syntax(talloc_tos(), &p->syntax),
+                p->hdr_req.opnum));
 
        if (DEBUGLEVEL >= 50) {
                fstring name;
                slprintf(name, sizeof(name)-1, "in_%s",
-                        get_pipe_name_from_iface(&p->syntax));
+                        get_pipe_name_from_syntax(talloc_tos(), &p->syntax));
                prs_dump(name, p->hdr_req.opnum, &p->in_data.data);
        }
 
@@ -2426,7 +2436,7 @@ static bool api_rpcTNP(pipes_struct *p,
        /* do the actual command */
        if(!api_rpc_cmds[fn_num].fn(p)) {
                DEBUG(0,("api_rpcTNP: %s: %s failed.\n",
-                        get_pipe_name_from_iface(&p->syntax),
+                        get_pipe_name_from_syntax(talloc_tos(), &p->syntax),
                         api_rpc_cmds[fn_num].name));
                prs_mem_free(&p->out_data.rdata);
                return False;
@@ -2451,13 +2461,13 @@ static bool api_rpcTNP(pipes_struct *p,
        if (DEBUGLEVEL >= 50) {
                fstring name;
                slprintf(name, sizeof(name)-1, "out_%s",
-                        get_pipe_name_from_iface(&p->syntax));
+                        get_pipe_name_from_syntax(talloc_tos(), &p->syntax));
                prs_dump(name, p->hdr_req.opnum, &p->out_data.rdata);
        }
        prs_set_offset(&p->out_data.rdata, offset2);
 
        DEBUG(5,("api_rpcTNP: called %s successfully\n",


-- 
Samba Shared Repository

Reply via email to