[SCM] Samba Shared Repository - branch v4-0-test updated

Karolin Seeger kseeger at samba.org
Thu Jan 10 03:47:05 MST 2013


The branch, v4-0-test has been updated
       via  4659595 s4:lib/messaging: terminate the irpc_servers_byname() result with server_id_set_disconnected() (bug #9540)
       via  af61dad smbd: Fix bug 9549 -- Memleak in the async echo handler
      from  0d5e2f4 docs: Fix typo in vfs_tsmsm.8.xml.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit 465959594a4e033878740f9dfe559525e4559094
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Jan 4 13:27:26 2013 +0100

    s4:lib/messaging: terminate the irpc_servers_byname() result with server_id_set_disconnected() (bug #9540)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 8d9a77f8646cd26371dc2ec1d3ed52730ac19eb9)
    
    Autobuild-User(v4-0-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-0-test): Thu Jan 10 11:46:05 CET 2013 on sn-devel-104

commit af61dad97203ff1a44093f1cf864c75c2558cd46
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Jan 8 15:34:19 2013 +0100

    smbd: Fix bug 9549 -- Memleak in the async echo handler
    
    Reviewed by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Tue Jan  8 23:30:41 CET 2013 on sn-devel-104
    (cherry picked from commit 3d5c534f0cc7c6e3eead7462eef4a178c7035857)

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

Summary of changes:
 source3/smbd/process.c              |    2 +-
 source4/lib/messaging/messaging.c   |    4 ++--
 source4/lib/messaging/pymessaging.c |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index eeda6f9..e934eaa 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -3022,7 +3022,7 @@ static void smbd_echo_got_packet(struct tevent_req *req)
 		}
 
 		iov = &state->pending[num_pending];
-		iov->iov_base = buf;
+		iov->iov_base = talloc_move(state->pending, &buf);
 		iov->iov_len = buflen;
 
 		DEBUG(10,("echo_handler[%d]: forward to main\n",
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c
index 6618897..29ba388 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -977,7 +977,7 @@ struct server_id *irpc_servers_byname(struct imessaging_context *msg_ctx,
 	for (i=0;i<count;i++) {
 		ret[i] = ((struct server_id *)rec.dptr)[i];
 	}
-	ret[i] = cluster_id(0, 0);
+	server_id_set_disconnected(&ret[i]);
 	free(rec.dptr);
 	tdb_unlock_bystring(t->tdb, name);
 	talloc_free(t);
@@ -1414,7 +1414,7 @@ struct dcerpc_binding_handle *irpc_binding_handle_by_name(TALLOC_CTX *mem_ctx,
 		errno = EADDRNOTAVAIL;
 		return NULL;
 	}
-	if (sids[0].pid == 0) {
+	if (server_id_is_disconnected(&sids[0])) {
 		talloc_free(sids);
 		errno = EADDRNOTAVAIL;
 		return NULL;
diff --git a/source4/lib/messaging/pymessaging.c b/source4/lib/messaging/pymessaging.c
index fca46e6..cb79d72 100644
--- a/source4/lib/messaging/pymessaging.c
+++ b/source4/lib/messaging/pymessaging.c
@@ -247,7 +247,7 @@ static PyObject *py_irpc_servers_byname(PyObject *self, PyObject *args, PyObject
 		return NULL;
 	}
 
-	for (i = 0; ids[i].pid != 0; i++) {
+	for (i = 0; !server_id_is_disconnected(&ids[i]); i++) {
 		/* Do nothing */
 	}
 
@@ -257,7 +257,7 @@ static PyObject *py_irpc_servers_byname(PyObject *self, PyObject *args, PyObject
 		PyErr_NoMemory();
 		return NULL;
 	}
-	for (i = 0; ids[i].pid; i++) {
+	for (i = 0; !server_id_is_disconnected(&ids[i]); i++) {
 		PyObject *py_server_id;
 		struct server_id *p_server_id = talloc(NULL, struct server_id);
 		if (!p_server_id) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list