From 4d191b6fa7b96ed56912bf68e6771ffb8e3cfe12 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 27 Apr 2010 10:21:28 +0200 Subject: s4:dsdb/common: if we don't have the ip of the client return the server site as client site metze --- source4/dsdb/common/util.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source4/dsdb') diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index 7dd68b8b99..60bcbe4846 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -1609,6 +1609,14 @@ const char *samdb_client_site_name(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, unsigned int i; int cnt, ret; + /* + * if we don't have a client ip e.g. ncalrpc + * the server site is the client site + */ + if (ip_address == NULL) { + return samdb_server_site_name(ldb, mem_ctx); + } + sites_container_dn = samdb_sites_dn(ldb, mem_ctx); if (sites_container_dn == NULL) { return NULL; -- cgit