s4:dsdb/common: if we don't have the ip of the client return the server site as clien...
authorStefan Metzmacher <metze@samba.org>
Tue, 27 Apr 2010 08:21:28 +0000 (10:21 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 27 Apr 2010 11:00:24 +0000 (13:00 +0200)
metze

source4/dsdb/common/util.c

index 7dd68b8b992793b6181f6852e51d573131cab846..60bcbe484686c18c332688ec774b31f1ca82f696 100644 (file)
@@ -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;