summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/common/util.c8
1 files changed, 8 insertions, 0 deletions
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;