summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-04-27 10:21:28 +0200
committerStefan Metzmacher <metze@samba.org>2010-04-27 13:00:24 +0200
commit4d191b6fa7b96ed56912bf68e6771ffb8e3cfe12 (patch)
tree6a0b00bd4002c179a24e5cd38051d7c448800f24 /source4
parent2436ec2928d1aac0e6fd885ca1b9cdecef8bf89a (diff)
downloadsamba-4d191b6fa7b96ed56912bf68e6771ffb8e3cfe12.tar.gz
samba-4d191b6fa7b96ed56912bf68e6771ffb8e3cfe12.tar.bz2
samba-4d191b6fa7b96ed56912bf68e6771ffb8e3cfe12.zip
s4:dsdb/common: if we don't have the ip of the client return the server site as client site
metze
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;