s4:netlogon RPC server - dcesrv_netr_DsRGetSiteName - add a small explaination
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Thu, 24 Nov 2011 16:03:00 +0000 (17:03 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 23 Dec 2011 09:36:33 +0000 (10:36 +0100)
NETLOGON pipe is only thought for DCs.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
source4/rpc_server/netlogon/dcerpc_netlogon.c

index 125fb3859eb60e4811620316001cd4921fa4af43..6d6cfe031ac96383c50286593e475e769b8c8334 100644 (file)
@@ -1296,6 +1296,11 @@ static WERROR dcesrv_netr_DsRGetSiteName(struct dcesrv_call_state *dce_call, TAL
                return WERR_DS_UNAVAILABLE;
        }
 
+       /*
+        * We assume to be a DC when we get called over NETLOGON. Hence we
+        * get our site name always by using "samdb_server_site_name()"
+        * and not "samdb_client_site_name()".
+        */
        *r->out.site = samdb_server_site_name(sam_ctx, mem_ctx);
        W_ERROR_HAVE_NO_MEMORY(*r->out.site);