[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Wed May 30 15:30:03 MDT 2012


The branch, master has been updated
       via  fc7e111 Fix bad bugfix for bug #8910 - resolve_ads() code can return zero addresses and miss valid DC IP addresses
       via  d7e52cc Fix metze's complaint about the bugfix for bug #8953 - winbind can hang as nbt_getdc() has no timeout.
      from  e697253 s3:libsmb: use nb_connect_send() directly instead of doing a 0 timer for port 139

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


- Log -----------------------------------------------------------------
commit fc7e1113c34819de6fc8053fb81ee2e0e970bec2
Author: Ira Cooper <ira at wakeful.net>
Date:   Wed May 30 11:50:06 2012 -0700

    Fix bad bugfix for bug #8910 - resolve_ads() code can return zero addresses and miss valid DC IP addresses
    
    Original code incorrectly used a while() instead of a for() loop.
    We need to iterate over the entire array here.
    
    Autobuild-User: Jeremy Allison <jra at samba.org>
    Autobuild-Date: Wed May 30 23:29:03 CEST 2012 on sn-devel-104

commit d7e52cc5273c3ec1a0570f06610e30b48c03bf6b
Author: Jeremy Allison <jra at samba.org>
Date:   Tue May 29 15:25:39 2012 -0700

    Fix metze's complaint about the bugfix for bug #8953 - winbind can hang as nbt_getdc() has no timeout.
    
    This code explicitly isn't needed as the tevent code will take
    care of this.

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

Summary of changes:
 source3/libsmb/clidgram.c  |    7 -------
 source3/libsmb/namequery.c |    2 +-
 2 files changed, 1 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/clidgram.c b/source3/libsmb/clidgram.c
index cfed067..3772194 100644
--- a/source3/libsmb/clidgram.c
+++ b/source3/libsmb/clidgram.c
@@ -450,8 +450,6 @@ NTSTATUS nbt_getdc(struct messaging_context *msg_ctx,
 	TALLOC_CTX *frame = talloc_stackframe();
 	struct tevent_context *ev;
 	struct tevent_req *req;
-	enum tevent_req_state err_state;
-	uint64_t error;
 	NTSTATUS status = NT_STATUS_NO_MEMORY;
 
 	ev = tevent_context_init(frame);
@@ -473,11 +471,6 @@ NTSTATUS nbt_getdc(struct messaging_context *msg_ctx,
 	status = nbt_getdc_recv(req, mem_ctx, pnt_version, dc_name,
 				samlogon_response);
  fail:
-	if (ev && req &&
-			tevent_req_is_error(req, &err_state, &error) &&
-			err_state == TEVENT_REQ_TIMED_OUT) {
-		status = NT_STATUS_IO_TIMEOUT;
-	}
 	TALLOC_FREE(frame);
 	return status;
 }
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index 3eae347..4c05e4f 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -2491,7 +2491,7 @@ static NTSTATUS resolve_ads(const char *name,
 
 	*return_count = 0;
 
-	while ( i < numdcs && (*return_count<numaddrs) ) {
+	for (i = 0; i < numdcs && (*return_count<numaddrs); i++ ) {
 		/* If we don't have an IP list for a name, lookup it up */
 		if (!dcs[i].ss_s) {
 			/* We need to get all IP addresses here. */


-- 
Samba Shared Repository


More information about the samba-cvs mailing list