svn commit: samba r21911 - in branches/SAMBA_4_0: . source/rpc_server

jelmer at samba.org jelmer at samba.org
Wed Mar 21 17:05:40 GMT 2007


Author: jelmer
Date: 2007-03-21 17:05:39 +0000 (Wed, 21 Mar 2007)
New Revision: 21911

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21911

Log:
Some more work on making the ncacn_np handling in smbd be less special.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c
   branches/SAMBA_4_0/source/rpc_server/dcerpc_sock.c


Changeset:

Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:merge
...skipped...

Modified: branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c	2007-03-21 16:26:25 UTC (rev 21910)
+++ branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c	2007-03-21 17:05:39 UTC (rev 21911)
@@ -1409,9 +1409,9 @@
 			break;
 			
 		case NCACN_NP:
-/*			FIXME: status = dcesrv_add_ep_np(dce_ctx, e, task->event_ctx, task->model_ops);
+			status = dcesrv_add_ep_np(dce_ctx, e, task->event_ctx, task->model_ops);
 			if (!NT_STATUS_IS_OK(status)) goto failed;
-*/			break;
+			break;
 
 		default:
 			status = NT_STATUS_NOT_SUPPORTED;

Modified: branches/SAMBA_4_0/source/rpc_server/dcerpc_sock.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/dcerpc_sock.c	2007-03-21 16:26:25 UTC (rev 21910)
+++ branches/SAMBA_4_0/source/rpc_server/dcerpc_sock.c	2007-03-21 17:05:39 UTC (rev 21911)
@@ -267,9 +267,55 @@
 	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)
+{
+	struct dcesrv_socket_context *dcesrv_sock;
+	NTSTATUS status;
+			
+	if (e->ep_description->endpoint == NULL) {
+		DEBUG(0, ("Endpoint mandatory for named pipes\n"));
+		return NT_STATUS_INVALID_PARAMETER;
+	}
+
+	dcesrv_sock = talloc(event_ctx, struct dcesrv_socket_context);
+	NT_STATUS_HAVE_NO_MEMORY(dcesrv_sock);
+
+	/* remember the endpoint of this socket */
+	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);
+	if (!NT_STATUS_IS_OK(status)) {
+		DEBUG(0,("service_setup_stream_socket(path=%s) failed - %s\n", 
+			 e->ep_description->endpoint, nt_errstr(status)));
+	}
+#endif
+	return status;
+}
+
+NTSTATUS dcesrv_add_ep_np(struct dcesrv_context *dce_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;
+}
+
+/*
+  add a socket address to the list of events, one event per dcerpc endpoint
+*/
 static NTSTATUS add_socket_rpc_tcp_iface(struct dcesrv_context *dce_ctx, struct dcesrv_endpoint *e,
 					 struct event_context *event_ctx, const struct model_ops *model_ops,
 					 const char *address)
@@ -324,5 +370,3 @@
 
 	return NT_STATUS_OK;
 }
-
-



More information about the samba-cvs mailing list