I got yer regression right HERE!

Esh, Andrew AEsh at tricord.com
Thu Dec 13 07:02:45 GMT 2001


I miswrote. The top change I listed is the *last one before* the problem
appeared. See "bug.diff" in my previous email to see what the changes were,
and which files and versions were affected.

-----Original Message-----
From: Esh, Andrew 
Sent: Thursday, December 13, 2001 8:48 AM
To: 'Urban Widmark'; Esh, Andrew
Cc: Samba-Technical (E-mail)
Subject: RE: I got yer regression right HERE!


I'm in the US/Central time zone, so 2001-11-27 20:43 is really 2001-11-28
02:43 GMT.

here is the cvs log for cliconnect.c. The top change is the first one after
the problem appeared. All times are in GMT:

----------------------------
revision 1.2.4.12
date: 2001/11/28 02:42:32;  author: jra;  state: Exp;  lines: +4 -0
Fixup merge that was causing wbinfo -u/-g to fail.
Jeremy.
----------------------------
revision 1.2.4.11
date: 2001/11/17 00:40:08;  author: jra;  state: Exp;  lines: +337 -216
VERY BIG CHANGE !!!!
This is the back-merge of the working winbindd from HEAD to 2.2.
As a side effect we now do NT status codes on the wire.
This will need *LOTS* of testing.... :-).

Jeremy.
----------------------------
revision 1.2.4.10
date: 2001/11/05 05:39:12;  author: jerry;  state: Exp;  lines: +2 -2
don't upper case the username.
----------------------------


-----Original Message-----
From: Urban Widmark [mailto:urban at teststation.com]
Sent: Thursday, December 13, 2001 3:01 AM
To: Esh, Andrew
Cc: Samba-Technical (E-mail)
Subject: Re: I got yer regression right HERE!


On Wed, 12 Dec 2001, Esh, Andrew wrote:

> cvs checkout command which gets first non-working version:
> cvs -z3 -d :pserver:cvs at pserver.samba.org:/cvsroot co -rSAMBA_2_2 -D
> "2001-11-27 20:43" -dsamba_2043 samba/source

-D specifies time in the local timezone, specifying GMT or something else
as well as a time makes it work world-wide. Still, having the date is very
helpful.

Someone made cli_shutdown free the struct if it was allocated, but didn't
verify all the callers. Untested patch below for smbmount & the 2_2
branch.

smbmount was double-free'ing when smbfs asked it to reconnect, making
smbmount crash and fail. smbfs would then return EIO because it had no
connection and could not read or verify the "inode" of that entry.

The output from the kernel I asked for previously would most likely have
showed that smbfs did try to reconnect. 

/Urban


Index: client/smbmount.c
===================================================================
RCS file: /cvsroot/samba/source/client/smbmount.c,v
retrieving revision 1.30.4.12
diff -u -r1.30.4.12 smbmount.c
--- client/smbmount.c	10 Dec 2001 23:20:26 -0000	1.30.4.12
+++ client/smbmount.c	13 Dec 2001 08:49:56 -0000
@@ -153,7 +153,6 @@
 		DEBUG(0,("%d: Connection to %s failed\n", getpid(),
server_n));
 		if (c) {
 			cli_shutdown(c);
-			free(c);
 		}
 		return NULL;
 	}
@@ -163,7 +162,6 @@
 		DEBUG(0,("%d: session request to %s failed (%s)\n", 
 			 getpid(), called.name, cli_errstr(c)));
 		cli_shutdown(c);
-		free(c);
 		if ((p=strchr(called.name, '.'))) {
 			*p = 0;
 			goto again;
@@ -180,7 +178,6 @@
 	if (!cli_negprot(c)) {
 		DEBUG(0,("%d: protocol negotiation failed\n", getpid()));
 		cli_shutdown(c);
-		free(c);
 		return NULL;
 	}
 
@@ -202,7 +199,6 @@
 			DEBUG(0,("%d: session setup failed: %s\n",
 				 getpid(), cli_errstr(c)));
 			cli_shutdown(c);
-			free(c);
 			return NULL;
 		}
 		DEBUG(0,("Anonymous login successful\n"));
@@ -215,7 +211,6 @@
 		DEBUG(0,("%d: tree connect failed: %s\n",
 			 getpid(), cli_errstr(c)));
 		cli_shutdown(c);
-		free(c);
 		return NULL;
 	}
 
@@ -364,7 +359,6 @@
 		   If we don't do this we will "leak" sockets and memory on
 		   each reconnection we have to make. */
 		cli_shutdown(c);
-		free(c);
 		c = NULL;
 
 		if (!closed) {
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the samba-technical mailing list