[PATCH] vfs_fileid: fix get_connectpath_ino

Volker Lendecke Volker.Lendecke at SerNet.DE
Mon Jan 14 10:30:38 UTC 2019


On Mon, Jan 14, 2019 at 10:32:11AM +0100, Ralph Wuerthner wrote:
> Hi Volker!
> 
> On 12.01.19 11:36, Volker Lendecke wrote:
> > On Thu, Jan 10, 2019 at 04:32:41PM +0100, Ralph Wuerthner via samba-technical wrote:
> > > Please see attached patch to fix function get_connectpath_ino in
> > > source3/modules/vfs_fileid.c. This is broken since 4.8 - so I guess we will
> > > need a bugzilla, right?
> > 
> > Looks absolutely right, RB+, and yes, we do need a bugzilla entry. Do
> > you want to create one and add the Bug: line to the commit message?
> > 
> > Thanks, Volker
> > 
> 
> I opened Samba bugzilla 13741 and updated the patch.

Reviewed-by: Volker Lendecke <vl at samba.org>

Volker

> From ad5bd84d0913a5fbb2fc20cbb256e2c8cd5e33e8 Mon Sep 17 00:00:00 2001
> From: Ralph Wuerthner <ralph.wuerthner at de.ibm.com>
> Date: Thu, 10 Jan 2019 14:28:14 +0100
> Subject: [PATCH] vfs_fileid: fix get_connectpath_ino
> 
> Bug: https://bugzilla.samba.org/show_bug.cgi?id=13741
> 
> Signed-off-by: Ralph Wuerthner <ralph.wuerthner at de.ibm.com>
> ---
>  source3/modules/vfs_fileid.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/source3/modules/vfs_fileid.c b/source3/modules/vfs_fileid.c
> index 5d08fe9..cb77a2e 100644
> --- a/source3/modules/vfs_fileid.c
> +++ b/source3/modules/vfs_fileid.c
> @@ -297,12 +297,14 @@ static int get_connectpath_ino(struct vfs_handle_struct *handle,
>  	}
>  
>  	ret = SMB_VFS_NEXT_STAT(handle, fname);
> -	TALLOC_FREE(fname);
>  	if (ret != 0) {
>  		DBG_ERR("stat failed for %s with %s\n",
>  			handle->conn->connectpath, strerror(errno));
> +		TALLOC_FREE(fname);
>  		return -1;
>  	}
> +	*ino = fname->st.st_ex_ino;
> +	TALLOC_FREE(fname);
>  
>  	return 0;
>  }
> -- 
> 2.7.4
> 


-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: 0551-370000-0, mailto:kontakt at sernet.de
Gesch.F.: Dr. Johannes Loxen und Reinhild Jung
AG Göttingen: HR-B 2816 - http://www.sernet.de



More information about the samba-technical mailing list