s4:rpc_server/lsa: specify \\pipe\lsass as ncacn_np_secondary_endpoint
[samba.git] / source4 / rpc_server / lsa / dcesrv_lsa.c
index 8575db6b204768a7c4518415e7bca2eb4a999ae6..cbbd9f482f2c28c76472e579332cddfab47cf50f 100644 (file)
 #include "lib/messaging/irpc.h"
 #include "libds/common/roles.h"
 
-#define DCESRV_INTERFACE_LSARPC_BIND(call, iface) \
-       dcesrv_interface_lsarpc_bind(call, iface)
-static NTSTATUS dcesrv_interface_lsarpc_bind(struct dcesrv_call_state *dce_call,
+#define DCESRV_INTERFACE_LSARPC_BIND(context, iface) \
+       dcesrv_interface_lsarpc_bind(context, iface)
+static NTSTATUS dcesrv_interface_lsarpc_bind(struct dcesrv_connection_context *context,
                                             const struct dcesrv_interface *iface)
 {
-       return dcesrv_interface_bind_reject_connect(dce_call, iface);
+       return dcesrv_interface_bind_reject_connect(context, iface);
 }
 
 static NTSTATUS lsarpc__op_init_server(struct dcesrv_context *dce_ctx,
                                       const struct dcesrv_endpoint_server *ep_server);
 static const struct dcesrv_interface dcesrv_lsarpc_interface;
 
+#define NCACN_NP_PIPE_NETLOGON "ncacn_np:[\\pipe\\netlogon]"
+#define NCACN_NP_PIPE_LSASS "ncacn_np:[\\pipe\\lsass]"
+#define DCESRV_INTERFACE_LSARPC_NCACN_NP_SECONDARY_ENDPOINT NCACN_NP_PIPE_LSASS
+
 #define DCESRV_INTERFACE_LSARPC_INIT_SERVER    \
        dcesrv_interface_lsarpc_init_server
 static NTSTATUS dcesrv_interface_lsarpc_init_server(struct dcesrv_context *dce_ctx,
@@ -54,7 +58,8 @@ static NTSTATUS dcesrv_interface_lsarpc_init_server(struct dcesrv_context *dce_c
 {
        if (lpcfg_lsa_over_netlogon(dce_ctx->lp_ctx)) {
                NTSTATUS ret = dcesrv_interface_register(dce_ctx,
-                                               "ncacn_np:[\\pipe\\netlogon]",
+                                               NCACN_NP_PIPE_NETLOGON,
+                                               NCACN_NP_PIPE_LSASS,
                                                &dcesrv_lsarpc_interface, NULL);
                if (!NT_STATUS_IS_OK(ret)) {
                        DEBUG(1,("lsarpc_op_init_server: failed to register endpoint '\\pipe\\netlogon'\n"));