s4: rpc_server: listen on named_pipes
authorStefan Metzmacher <metze@samba.org>
Sat, 17 May 2008 00:39:57 +0000 (02:39 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 6 Nov 2008 20:39:14 +0000 (21:39 +0100)
metze

source4/rpc_server/service_rpc.c

index f168614ad5b7f9cfbead5db5a38709c8420e2b01..e526b17db19cd0a0e9916407321186d0d99bb90f 100644 (file)
@@ -287,12 +287,10 @@ static NTSTATUS dcesrv_add_ep_ncalrpc(struct dcesrv_context *dce_ctx,
        return status;
 }
 
-
-/*
-  add a socket address to the list of events, one event per dcerpc endpoint
-*/
-static NTSTATUS add_socket_rpc_pipe_iface(struct dcesrv_context *dce_ctx, struct dcesrv_endpoint *e,
-                                        struct event_context *event_ctx, const struct model_ops *model_ops)
+static NTSTATUS dcesrv_add_ep_np(struct dcesrv_context *dce_ctx,
+                                struct loadparm_context *lp_ctx,
+                                struct dcesrv_endpoint *e,
+                                struct event_context *event_ctx, const struct model_ops *model_ops)
 {
        struct dcesrv_socket_context *dcesrv_sock;
        NTSTATUS status;
@@ -309,30 +307,16 @@ static NTSTATUS add_socket_rpc_pipe_iface(struct dcesrv_context *dce_ctx, struct
        dcesrv_sock->endpoint           = e;
        dcesrv_sock->dcesrv_ctx         = talloc_reference(dcesrv_sock, dce_ctx);
 
-       status = NT_STATUS_OK;
-#if 0
-
-       status = stream_setup_smb_pipe(event_ctx, model_ops, &dcesrv_stream_ops, 
-                                    e->ep_description->endpoint, dcesrv_sock);
+       status = stream_setup_named_pipe(event_ctx, lp_ctx,
+                                        model_ops, &dcesrv_stream_ops,
+                                        e->ep_description->endpoint, dcesrv_sock);
        if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(0,("service_setup_stream_socket(path=%s) failed - %s\n", 
+               DEBUG(0,("stream_setup_named_pipe(pipe=%s) failed - %s\n",
                         e->ep_description->endpoint, nt_errstr(status)));
+               return status;
        }
-#endif
-       return status;
-}
 
-static NTSTATUS dcesrv_add_ep_np(struct dcesrv_context *dce_ctx, 
-                                struct loadparm_context *lp_ctx,
-                                struct dcesrv_endpoint *e,
-                                struct event_context *event_ctx, const struct model_ops *model_ops)
-{
-       NTSTATUS status;
-
-       status = add_socket_rpc_pipe_iface(dce_ctx, e, event_ctx, model_ops);
-       NT_STATUS_NOT_OK_RETURN(status);
-
-       return status;
+       return NT_STATUS_OK;
 }
 
 /*