[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Wed Feb 2 05:29:01 MST 2011


The branch, master has been updated
       via  5aae1f4 s3-selftest: Enable RPC-EPMAPPER tests.
       via  d0d5d59 s3-smbd: Disable the endpoint mapper by default.
       via  e3bdfd2 s3-smbd: Added a function to setup rpc services.
       via  612060d s3-rpc_server: Only allow registering endpoints on priviledged pipes.
       via  3177966 s3-librpc: Added dcerpc_binding_vector_create function.
       via  20afe97 s3-librpc: Added dcerpc register endpoint functions.
       via  bd5d14e s3-epmapper: Commented unimplemented functions.
       via  c451a45 s3-epmapper: Improved the epm_Map function.
       via  1d33f5c s3-epmapper: Implemented epm_Lookup.
       via  5b93e06 s3-epmapper: Implemented epm_LookupHandleFree.
       via  3584dd1 s3-epmapper: Added arg to match uuid in build_ep_list().
       via  658c05b s3-epmapper: Added epm_Map function from Samba4.
       via  6747b89 s3-epmapper: Added epm_Delete function.
       via  c31ee9a s3-epmapper: Added epm_Insert function.
       via  8499539 s3-epmapper: Added a endpoint mapper skeleton.
      from  eca7292 s4:torture/rpc/netlogon: add invalid level tests for netr_LogonControl2

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


- Log -----------------------------------------------------------------
commit 5aae1f462ed09decfc41d77a10dd4f135336986b
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Oct 4 18:32:35 2010 +0200

    s3-selftest: Enable RPC-EPMAPPER tests.
    
    Autobuild-User: Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date: Wed Feb  2 13:28:41 CET 2011 on sn-devel-104

commit d0d5d59943ac7958e95279cd8f8be3097e5e7db8
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Jan 20 15:37:46 2011 +0100

    s3-smbd: Disable the endpoint mapper by default.

commit e3bdfd2d46cb09a42eda1012287bb82af5b8ee9b
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Jan 5 17:16:46 2011 +0100

    s3-smbd: Added a function to setup rpc services.
    
    Move the complete setup of the rpc service to its own file and use
    callbacks to register at the endpoint mapper.

commit 612060d677ac64de1b9261beb2d98496cec2ab46
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Jan 4 09:52:57 2011 +0100

    s3-rpc_server: Only allow registering endpoints on priviledged pipes.

commit 31779662b728fa6cefd21df742273fd31d8d8dfb
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Sep 16 10:48:33 2010 +0200

    s3-librpc: Added dcerpc_binding_vector_create function.

commit 20afe971777811c8e645a4d37b5159cd8300d3a8
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Sep 2 16:24:26 2010 +0200

    s3-librpc: Added dcerpc register endpoint functions.

commit bd5d14e6fa778b77217ca326828fd61cf516bd9b
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Jan 18 09:48:35 2011 +0100

    s3-epmapper: Commented unimplemented functions.

commit c451a454b3a87301ed17b3e7a06de37e6cfcb41e
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Dec 21 19:38:40 2010 +0100

    s3-epmapper: Improved the epm_Map function.

commit 1d33f5c6d641f2c4c18eae47f7d9ef464396f471
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Oct 5 11:56:47 2010 +0200

    s3-epmapper: Implemented epm_Lookup.

commit 5b93e06e6c6a67640ee3cd4de1ffbbaa3018721f
Author: Andreas Schneider <asn at cynapses.org>
Date:   Mon Oct 11 11:42:26 2010 +0200

    s3-epmapper: Implemented epm_LookupHandleFree.

commit 3584dd18df1179ecb41791e2b14929699fc09660
Author: Andreas Schneider <asn at cynapses.org>
Date:   Mon Oct 11 17:22:22 2010 +0200

    s3-epmapper: Added arg to match uuid in build_ep_list().

commit 658c05b939e0a96cb385bf2808b01595ae838f06
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Oct 4 17:58:33 2010 +0200

    s3-epmapper: Added epm_Map function from Samba4.

commit 6747b89b3ce0e234c6129696825c59b68cada8cd
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Oct 5 11:45:41 2010 +0200

    s3-epmapper: Added epm_Delete function.

commit c31ee9a152d64c8236cc20af1a78ac0feb999f81
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Sep 16 10:50:25 2010 +0200

    s3-epmapper: Added epm_Insert function.

commit 84995397a7f24961065b17693afc1fda22b7bfd5
Author: Andreas Schneider <asn at samba.org>
Date:   Mon Oct 4 15:56:49 2010 +0200

    s3-epmapper: Added a endpoint mapper skeleton.

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

Summary of changes:
 selftest/target/Samba3.pm                          |    2 +
 source3/Makefile.in                                |    9 +-
 source3/librpc/rpc/dcerpc_ep.c                     |  250 +++++
 source3/librpc/rpc/dcerpc_ep.h                     |   72 ++
 source3/rpc_server/srv_epmapper.c                  | 1038 ++++++++++++++++++++
 source3/rpc_server/srv_rpc_register.c              |  403 ++++++++
 .../srv_rpc_register.h}                            |   15 +-
 source3/script/tests/selftest.sh                   |    2 +
 source3/script/tests/test_posix_s3.sh              |    2 +-
 source3/smbd/server.c                              |   91 +--
 10 files changed, 1787 insertions(+), 97 deletions(-)
 create mode 100644 source3/librpc/rpc/dcerpc_ep.c
 create mode 100644 source3/librpc/rpc/dcerpc_ep.h
 create mode 100644 source3/rpc_server/srv_epmapper.c
 create mode 100644 source3/rpc_server/srv_rpc_register.c
 copy source3/{printing/nt_printing_migrate.h => rpc_server/srv_rpc_register.h} (70%)


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 3104e49..a0a13f9 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -556,6 +556,8 @@ sub provision($$$$$$)
 	queue resume command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb queueresume %p
 	lpq cache time = 0
 
+	rpc_server:epmapper = embedded
+
 	# Begin extra options
 	$extra_options
 	# End extra options
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 0740133..7e07435 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -658,6 +658,8 @@ REG_FULL_OBJ = $(REG_SMBCONF_OBJ) \
 
 LIB_EVENTLOG_OBJ = lib/eventlog/eventlog.o
 
+DCE_RPC_EP_OBJ = librpc/rpc/dcerpc_ep.o
+
 RPC_LSARPC_OBJ = rpc_server/srv_lsa_nt.o \
 		 librpc/gen_ndr/srv_lsa.o
 
@@ -718,11 +720,15 @@ RPC_PIPE_OBJ = rpc_server/srv_pipe.o rpc_server/srv_pipe_hnd.o \
 
 RPC_RPCECHO_OBJ = rpc_server/srv_echo_nt.o librpc/gen_ndr/srv_echo.o
 
+RPC_EPMAPPER_OBJ = rpc_server/srv_epmapper.o librpc/gen_ndr/srv_epmapper.o
+
+RPC_SERVER_REGISTER_OBJ = rpc_server/srv_rpc_register.o $(DCE_RPC_EP_OBJ)
+
 RPC_SERVER_OBJ = $(RPC_LSARPC_OBJ) $(RPC_WINREG_OBJ) $(RPC_INITSHUTDOWN_OBJ) \
 		 $(RPC_DSSETUP_OBJ) $(RPC_WKSSVC_OBJ) $(RPC_SVCCTL_OBJ) \
 		 $(RPC_NTSVCS_OBJ) $(RPC_NETLOGON_OBJ) $(RPC_NETDFS_OBJ) \
 		 $(RPC_SRVSVC_OBJ) $(RPC_SPOOLSS_OBJ) $(RPC_EVENTLOG_OBJ) \
-		 $(RPC_SAMR_OBJ) $(RPC_RPCECHO_OBJ) \
+		 $(RPC_SAMR_OBJ) $(RPC_RPCECHO_OBJ) $(RPC_EPMAPPER_OBJ) \
 		 $(RPC_PIPE_OBJ) $(NPA_TSTREAM_OBJ) \
 		 $(LIBCLI_SPOOLSS_OBJ) \
 		 $(LIBCLI_WINREG_OBJ) \
@@ -730,6 +736,7 @@ RPC_SERVER_OBJ = $(RPC_LSARPC_OBJ) $(RPC_WINREG_OBJ) $(RPC_INITSHUTDOWN_OBJ) \
 		 $(LIBCLI_LSA_OBJ) \
 		 $(LIBCLI_SAMR_OBJ) \
 		 $(LIBCLI_NETLOGON_OBJ) \
+		 $(RPC_SERVER_REGISTER_OBJ) \
 		 $(RPC_CLIENT_SCHANNEL_OBJ) \
 		 rpc_client/init_netlogon.o \
 		 rpc_client/init_samr.o
diff --git a/source3/librpc/rpc/dcerpc_ep.c b/source3/librpc/rpc/dcerpc_ep.c
new file mode 100644
index 0000000..ffe372c
--- /dev/null
+++ b/source3/librpc/rpc/dcerpc_ep.c
@@ -0,0 +1,250 @@
+/*
+ *  Endpoint Mapper Functions
+ *  DCERPC local endpoint mapper client routines
+ *  Copyright (c) 2010      Andreas Schneider.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "includes.h"
+#include "librpc/rpc/dcerpc.h"
+#include "librpc/rpc/dcerpc_ep.h"
+#include "librpc/gen_ndr/cli_epmapper.h"
+
+#define EPM_MAX_ANNOTATION_SIZE 64
+
+NTSTATUS dcerpc_binding_vector_create(TALLOC_CTX *mem_ctx,
+				      const struct ndr_interface_table *iface,
+				      struct dcerpc_binding_vector **pbvec)
+{
+	struct dcerpc_binding_vector *bvec;
+	uint32_t ep_count, i;
+	NTSTATUS status;
+	TALLOC_CTX *tmp_ctx;
+
+	tmp_ctx = talloc_stackframe();
+	if (tmp_ctx == NULL) {
+		return NT_STATUS_NO_MEMORY;
+	}
+
+	ep_count = iface->endpoints->count;
+
+	bvec = talloc_zero(tmp_ctx, struct dcerpc_binding_vector);
+	if (bvec == NULL) {
+		status = NT_STATUS_NO_MEMORY;
+		goto done;
+	}
+
+	bvec->bindings = talloc_array(bvec, struct dcerpc_binding, ep_count);
+	if (bvec->bindings == NULL) {
+		status = NT_STATUS_NO_MEMORY;
+		goto done;
+	}
+
+	for (i = 0; i < ep_count; i++) {
+		struct dcerpc_binding *b;
+
+		b = talloc_zero(bvec->bindings, struct dcerpc_binding);
+		if (b == NULL) {
+			status = NT_STATUS_NO_MEMORY;
+			goto done;
+		}
+
+		status = dcerpc_parse_binding(b, iface->endpoints->names[i], &b);
+		if (!NT_STATUS_IS_OK(status)) {
+			status = NT_STATUS_UNSUCCESSFUL;
+			goto done;
+		}
+
+		b->object = iface->syntax_id;
+		if (b->transport == NCACN_NP) {
+			b->host = talloc_asprintf(b, "\\\\%s", global_myname());
+		}
+
+		bvec->bindings[i] = *b;
+	}
+	bvec->count = ep_count;
+
+	*pbvec = talloc_move(mem_ctx, &bvec);
+
+	status = NT_STATUS_OK;
+done:
+	talloc_free(tmp_ctx);
+
+	return status;
+}
+
+static NTSTATUS ep_register(const struct ndr_interface_table *iface,
+			    const struct dcerpc_binding_vector *bind_vec,
+			    const struct GUID *object_guid,
+			    const char *annotation,
+			    uint32_t replace,
+			    uint32_t unregister)
+{
+	struct dcerpc_binding_handle *h = NULL;
+	static struct client_address client_id;
+	struct epm_entry_t *entries;
+	uint32_t num_ents, i;
+	TALLOC_CTX *tmp_ctx;
+	uint32_t result = EPMAPPER_STATUS_OK;
+	NTSTATUS status;
+
+	if (iface == NULL) {
+		return NT_STATUS_INVALID_PARAMETER;
+	}
+
+	if (bind_vec == NULL || bind_vec->count == 0) {
+		return NT_STATUS_INVALID_PARAMETER;
+	}
+
+	tmp_ctx = talloc_stackframe();
+	if (tmp_ctx == NULL) {
+		return NT_STATUS_NO_MEMORY;
+	}
+
+#if 0
+	/* NOTE: Samba3 doesn't have a ncalrpc server component yet. As soon as
+	 * this is supported, we should talk to the endpoint mapper over the
+	 * local transport.
+	 */
+
+	/* Connect to the endpoint mapper locally */
+	ncalrpc_sock = talloc_asprintf(tmp_ctx,
+				      "%s/%s",
+				      get_dyn_NCALRPCDIR(),
+				      "epmapper");
+	if (ncalrpc_sock == NULL) {
+		status = NT_STATUS_NO_MEMORY;
+		goto done;
+	}
+
+	status = rpc_pipe_open_ncalrpc(tmp_ctx,
+				       ncalrpc_sock,
+				       &ndr_table_epmapper.syntax_id,
+				       &cli);
+	if (!NT_STATUS_IS_OK(status)) {
+		goto done;
+	}
+#endif
+
+	strlcpy(client_id.addr, "localhost", sizeof(client_id.addr));
+	client_id.name = "localhost";
+
+	status = rpcint_binding_handle(tmp_ctx,
+				       &ndr_table_epmapper,
+				       &client_id,
+				       get_server_info_system(),
+				       server_messaging_context(),
+				       &h);
+	if (!NT_STATUS_IS_OK(status)) {
+		DEBUG(0, ("dcerpc_ep_register: Could not connect to epmapper (%s)",
+			  nt_errstr(status)));
+		goto done;
+	}
+
+	num_ents = bind_vec->count;
+	entries = talloc_array(tmp_ctx, struct epm_entry_t, num_ents);
+
+	for (i = 0; i < num_ents; i++) {
+		struct dcerpc_binding *map_binding = &bind_vec->bindings[i];
+		struct epm_twr_t *map_tower;
+
+		map_tower = talloc_zero(entries, struct epm_twr_t);
+		if (map_tower == NULL) {
+			goto done;
+		}
+
+		status = dcerpc_binding_build_tower(entries,
+						    map_binding,
+						    &map_tower->tower);
+		if (!NT_STATUS_IS_OK(status)) {
+			goto done;
+		}
+
+		entries[i].tower = map_tower;
+		if (annotation == NULL) {
+			entries[i].annotation = talloc_strdup(entries, "");
+		} else {
+			entries[i].annotation = talloc_strndup(entries,
+							       annotation,
+							       EPM_MAX_ANNOTATION_SIZE);
+		}
+		if (entries[i].annotation == NULL) {
+			status = NT_STATUS_NO_MEMORY;
+			goto done;
+		}
+
+		if (object_guid != NULL) {
+			entries[i].object = *object_guid;
+		} else {
+			entries[i].object = map_binding->object.uuid;
+		}
+	}
+
+	if (unregister) {
+		status = dcerpc_epm_Delete(h,
+					   tmp_ctx,
+					   num_ents,
+					   entries,
+					   &result);
+	} else {
+		status = dcerpc_epm_Insert(h,
+					   tmp_ctx,
+					   num_ents,
+					   entries,
+					   replace,
+					   &result);
+	}
+	if (!NT_STATUS_IS_OK(status)) {
+		DEBUG(0, ("dcerpc_ep_register: Could not insert tower (%s)\n",
+			  nt_errstr(status)));
+		goto done;
+	}
+	if (result != EPMAPPER_STATUS_OK) {
+		DEBUG(0, ("dcerpc_ep_register: Could not insert tower (0x%.8x)\n",
+			  result));
+		status = NT_STATUS_UNSUCCESSFUL;
+		goto done;
+	}
+
+done:
+	talloc_free(tmp_ctx);
+
+	return status;
+}
+
+NTSTATUS dcerpc_ep_register(const struct ndr_interface_table *iface,
+			    const struct dcerpc_binding_vector *bind_vec,
+			    const struct GUID *object_guid,
+			    const char *annotation)
+{
+	return ep_register(iface, bind_vec, object_guid, annotation, 1, 0);
+}
+
+NTSTATUS dcerpc_ep_register_noreplace(const struct ndr_interface_table *iface,
+				      const struct dcerpc_binding_vector *bind_vec,
+				      const struct GUID *object_guid,
+				      const char *annotation)
+{
+	return ep_register(iface, bind_vec, object_guid, annotation, 0, 0);
+}
+
+NTSTATUS dcerpc_ep_unregister(const struct ndr_interface_table *iface,
+			      const struct dcerpc_binding_vector *bind_vec,
+			      const struct GUID *object_guid)
+{
+	return ep_register(iface, bind_vec, object_guid, NULL, 0, 1);
+}
+
+/* vim: set ts=8 sw=8 noet cindent syntax=c.doxygen: */
diff --git a/source3/librpc/rpc/dcerpc_ep.h b/source3/librpc/rpc/dcerpc_ep.h
new file mode 100644
index 0000000..6da7f9b
--- /dev/null
+++ b/source3/librpc/rpc/dcerpc_ep.h
@@ -0,0 +1,72 @@
+/*
+ *  Endpoint Mapper Functions
+ *  DCERPC local endpoint mapper client routines
+ *  Copyright (c) 2010      Andreas Schneider.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _DCERPC_EP_H_
+#define _DCERPC_EP_H_
+
+struct dcerpc_binding_vector {
+    struct dcerpc_binding *bindings;
+    uint32_t count;
+};
+
+NTSTATUS dcerpc_binding_vector_create(TALLOC_CTX *mem_ctx,
+				      const struct ndr_interface_table *iface,
+				      struct dcerpc_binding_vector **pbvec);
+
+/**
+ * @brief Adds server address information in the local endpoint map.
+ *
+ * @param[in]  iface    The interface specification to register with the local
+ *                      endpoint map.
+ *
+ * @param[in]  binding  The server binding handles over which the server can
+ *                      receive remote procedure calls.
+ *
+ * @param[in]  object_guid The object GUID that the server offers. The server
+ *                         application constructs this vector.
+ *
+ * @param[in]  annotation  Defines a character string comment applied to the
+ *                         element added to the local endpoint map. The string
+ *                         can be up to 64 characters long, including the null
+ *                         terminating character. Strings longer than 64
+ *                         characters are truncated. The application supplies
+ *                         the value NULL or the string "" to indicate an empty
+ *                         annotation string.
+ *
+ *                         When replacing elements, the annotation string
+ *                         supplied, including an empty annotation string,
+ *                         replaces any existing annotation string.
+ *
+ * @return                 An NTSTATUS error code.
+ */
+NTSTATUS dcerpc_ep_register(const struct ndr_interface_table *iface,
+			    const struct dcerpc_binding_vector *bind_vec,
+			    const struct GUID *object_guid,
+			    const char *annotation);
+
+NTSTATUS dcerpc_ep_register_noreplace(const struct ndr_interface_table *iface,
+				      const struct dcerpc_binding_vector *bind_vec,
+				      const struct GUID *object_guid,
+				      const char *annotation);
+
+NTSTATUS dcerpc_ep_unregister(const struct ndr_interface_table *iface,
+			      const struct dcerpc_binding_vector *bind_vec,
+			      const struct GUID *object_guid);
+
+#endif /* _DCERPC_EP_H_ */
diff --git a/source3/rpc_server/srv_epmapper.c b/source3/rpc_server/srv_epmapper.c
new file mode 100644
index 0000000..0ec50a4
--- /dev/null
+++ b/source3/rpc_server/srv_epmapper.c
@@ -0,0 +1,1038 @@
+/*
+   Unix SMB/CIFS implementation.
+
+   Endpoint server for the epmapper pipe
+
+   Copyright (C) 2010-2011 Andreas Schneider <asn at samba.org>
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "includes.h"
+#include "../libcli/security/security.h"
+#include "librpc/gen_ndr/ndr_epmapper.h"
+#include "librpc/gen_ndr/srv_epmapper.h"
+
+typedef uint32_t error_status_t;
+
+/* An endpoint combined with an interface description */
+struct dcesrv_ep_iface {
+	const char *name;
+	struct ndr_syntax_id syntax_id;
+	struct epm_tower ep;
+};
+
+/* A rpc service interface like samr, lsarpc or netlogon */
+struct dcesrv_iface {
+	const char *name;
+	struct ndr_syntax_id syntax_id;
+};
+
+struct dcesrv_iface_list {
+	struct dcesrv_iface_list *next, *prev;
+	struct dcesrv_iface *iface;
+};
+
+/*
+ * An endpoint can serve multiple rpc services interfaces.
+ * For example \\pipe\netlogon can be used by lsarpc and netlogon.
+ */
+struct dcesrv_endpoint {
+	struct dcesrv_endpoint *next, *prev;
+
+	/* The type and the location of the endpoint */
+	struct dcerpc_binding *ep_description;
+
+	/* A list of rpc services able to connect to the endpoint */
+	struct dcesrv_iface_list *iface_list;
+};
+
+struct rpc_eps {
+	struct dcesrv_ep_iface *e;
+	uint32_t count;
+};
+
+struct dcesrv_endpoint *endpoint_table;
+
+/*
+ * Check if the UUID and if_version match to an interface.
+ */
+static bool interface_match(const struct dcesrv_iface *if1,
+			    const struct dcesrv_iface *if2)
+{
+	return GUID_equal(&if1->syntax_id.uuid, &if2->syntax_id.uuid);
+}
+
+/*
+ * Find the interface operations on an endpoint.
+ */
+static const struct dcesrv_iface *find_interface(const struct dcesrv_endpoint *endpoint,
+						 const struct dcesrv_iface *iface)
+{
+	struct dcesrv_iface_list *iflist;
+
+	for (iflist = endpoint->iface_list; iflist; iflist = iflist->next) {
+		if (interface_match(iflist->iface, iface)) {
+			return iflist->iface;
+		}
+	}
+
+	return NULL;
+}
+
+/*
+ * See if a uuid and if_version match to an interface
+ */
+static bool interface_match_by_uuid(const struct dcesrv_iface *iface,
+				    const struct GUID *uuid)
+{
+	return GUID_equal(&iface->syntax_id.uuid, uuid);
+}
+
+static struct dcesrv_iface_list *find_interface_list(const struct dcesrv_endpoint *endpoint,
+						     const struct dcesrv_iface *iface)
+{
+	struct dcesrv_iface_list *iflist;
+
+	for (iflist = endpoint->iface_list; iflist; iflist = iflist->next) {
+		if (interface_match(iflist->iface, iface)) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list