[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Wed Feb 9 09:27:01 MST 2011


The branch, master has been updated
       via  edbd6f4 s3-rpc_server: We need a messaging context for rpc.
       via  1b5609a s3-rpc_server: Fixed possible segfault with client_id.
      from  d8a90b4 s3:utils enable sharesec for registry shares

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit edbd6f4a93fffb1ccbf678b462ccffe09977c9d0
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Feb 9 14:21:24 2011 +0100

    s3-rpc_server: We need a messaging context for rpc.
    
    Autobuild-User: Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date: Wed Feb  9 17:26:00 CET 2011 on sn-devel-104

commit 1b5609aa4d72fe3e8bd916440844cc380d75d96a
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Feb 9 14:08:34 2011 +0100

    s3-rpc_server: Fixed possible segfault with client_id.

-----------------------------------------------------------------------

Summary of changes:
 source3/rpc_server/rpc_server.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c
index 5be0e5e..229096e 100644
--- a/source3/rpc_server/rpc_server.c
+++ b/source3/rpc_server/rpc_server.c
@@ -98,6 +98,12 @@ static int make_server_pipes_struct(TALLOC_CTX *mem_ctx,
 	}
 	strlcpy(p->client_id->addr,
 		client_address, sizeof(p->client_id->addr));
+	p->client_id->name = talloc_strdup(p->client_id, client_address);
+	if (p->client_id->name == NULL) {
+		TALLOC_FREE(p);
+		*perrno = ENOMEM;
+		return -1;
+	}
 
 	talloc_set_destructor(p, close_internal_rpc_pipe_hnd);
 
@@ -300,6 +306,7 @@ struct named_pipe_client {
 	struct ndr_syntax_id pipe_id;
 
 	struct tevent_context *ev;
+	struct messaging_context *msg_ctx;
 
 	uint16_t file_type;
 	uint16_t device_state;
@@ -350,6 +357,7 @@ static void named_pipe_accept_function(const char *pipe_name, int fd)
 	npc->pipe_name = pipe_name;
 	npc->pipe_id = syntax;
 	npc->ev = server_event_context();
+	npc->msg_ctx = server_messaging_context();
 
 	/* make sure socket is in NON blocking state */
 	ret = set_blocking(fd, false);
@@ -433,6 +441,7 @@ static void named_pipe_accept_done(struct tevent_req *subreq)
 			  strerror(error)));
 		goto fail;
 	}
+	npc->p->msg_ctx = npc->msg_ctx;
 
 	npc->write_queue = tevent_queue_create(npc, "np_server_write_queue");
 	if (!npc->write_queue) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list