From 31dee9637c2f2096924f97465026accf860e54d3 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 11 Aug 2011 12:37:53 +0200 Subject: [PATCH] s3: Fix vfs_chown_fsp, fix bug 8370 The race fixes introduced a SMB_VFS_CHDIR into the parent directory of the file. To get back to the original directory, we can't use vfs_ChDir which has a cache which was not filled correctly with the direct VFS_CHDIR call. So we never jumped back to the original directory. --- source3/smbd/vfs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 3405a1c..340e7e5 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -1543,7 +1543,7 @@ NTSTATUS vfs_chown_fsp(files_struct *fsp, uid_t uid, gid_t gid) } if (as_root) { - vfs_ChDir(fsp->conn,saved_dir); + SMB_VFS_CHDIR(fsp->conn,saved_dir); TALLOC_FREE(saved_dir); TALLOC_FREE(parent_dir); } -- 1.7.4.1