[PATCH] vfs_fruit: Fix a talloc hierarchy error

Ralph Böhme rb at sernet.de
Thu Jan 8 03:41:03 MST 2015


On Wed, Jan 07, 2015 at 10:18:43PM +0100, Volker Lendecke wrote:
> On Wed, Jan 07, 2015 at 07:01:11PM +0100, Ralph Böhme wrote:
> > On Wed, Jan 07, 2015 at 12:04:29PM +0100, Ralph Böhme wrote:
> > > On Wed, Jan 07, 2015 at 11:48:57AM +0100, Volker Lendecke wrote:
> > > > Hi!
> > > > 
> > > > Review&push appreciated!
> > > 
> > > good catch, pushed! Thanks!
> > 
> > looks like this breaks samba3.vfs.fruit. I'll look into it.
> > <https://git.samba.org/slow/samba-autobuild/samba.stdout>
> 
> Yes, working on this. We get a sharing violation in the write metadata
> test, and smbtorture goes into the sleep(1000000). Something really
> weird is going on. I'm working on this as well.
> 
> I'd assert though that my patch does fix *something*. It might uncover
> a deeper bug, but the valgrind error is gone.

here's the correct patch plus a small enhancement for the torture test.

Please review&push if ok.

Thanks!
-Ralph

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de,mailto:kontakt@sernet.de
-------------- next part --------------
From f87d9621dfc98ce34c85e955e07c4a84678f0773 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Tue, 6 Jan 2015 15:55:15 +0000
Subject: [PATCH 1/2] vfs_fruit: fix base_fsp name conversion

Signed-off-by: Ralph Boehme <slow at samba.org>
---
 source3/modules/vfs_fruit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index ecaddfb..e2d9b35 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -2877,7 +2877,7 @@ static int fruit_fstat(vfs_handle_struct *handle, files_struct *fsp,
 		   smb_fname_str_dbg(fsp->fsp_name)));
 
 	if (fsp->base_fsp) {
-		tmp_base_name = fsp->fsp_name->base_name;
+		tmp_base_name = fsp->base_fsp->fsp_name->base_name;
 		/* fsp_name is not converted with vfs_catia */
 		status = SMB_VFS_TRANSLATE_NAME(
 			handle->conn,
-- 
1.9.3


From 74b06eac6f25ad0608b5ffb4b233bb98377c6975 Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow at samba.org>
Date: Wed, 7 Jan 2015 22:47:13 +0100
Subject: [PATCH 2/2] s4:torture:vfs_fruit: fix model name check

Don't abort when the model string is not "Samba", simply log it.

Signed-off-by: Ralph Boehme <slow at samba.org>
---
 source4/torture/vfs/fruit.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c
index 5d4a411..162885e 100644
--- a/source4/torture/vfs/fruit.c
+++ b/source4/torture/vfs/fruit.c
@@ -1501,13 +1501,7 @@ static bool test_aapl(struct torture_context *tctx,
 			       __location__);
 		goto done;
 	}
-	if (strncmp(model, "Samba", 5) != 0) {
-		torture_result(tctx, TORTURE_FAIL,
-			       "(%s) expected model \"Samba\", got: \"%s\"",
-			       __location__, model);
-		ret = false;
-		goto done;
-	}
+	torture_comment(tctx, "Got server model: \"%s\"\n", model);
 
 	/*
 	 * Now that Requested AAPL extensions are enabled, setup some
-- 
1.9.3



More information about the samba-technical mailing list