[SCM] Samba Shared Repository - branch v3-5-test updated
Karolin Seeger
kseeger at samba.org
Sat Aug 20 12:49:17 MDT 2011
The branch, v3-5-test has been updated
via 0b1ce3f s3-vfs: Fix vfs_chown_fsp.
from b42573a s3: Fix bug 8360
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test
- Log -----------------------------------------------------------------
commit 0b1ce3f177b75e146fdae0b5531c54dedffada1d
Author: Jeremy Allison <jra at samba.org>
Date: Sat Aug 20 20:49:59 2011 +0200
s3-vfs: Fix vfs_chown_fsp.
Fix bug #8370 (vfs_chown_fsp broken -- returns in the wrong directory).
-----------------------------------------------------------------------
Summary of changes:
source3/modules/vfs_acl_common.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index ee33f21..b209824 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -825,6 +825,13 @@ static int acl_common_remove_object(vfs_handle_struct *handle,
const char *final_component = NULL;
struct smb_filename local_fname;
int saved_errno = 0;
+ char *saved_dir = NULL;
+
+ saved_dir = vfs_GetWd(talloc_tos(),conn);
+ if (!saved_dir) {
+ saved_errno = errno;
+ goto out;
+ }
if (!parent_dirname(talloc_tos(), path,
&parent_dir, &final_component)) {
@@ -837,7 +844,7 @@ static int acl_common_remove_object(vfs_handle_struct *handle,
parent_dir, final_component ));
/* cd into the parent dir to pin it. */
- ret = SMB_VFS_CHDIR(conn, parent_dir);
+ ret = vfs_ChDir(conn, parent_dir);
if (ret == -1) {
saved_errno = errno;
goto out;
@@ -890,7 +897,9 @@ static int acl_common_remove_object(vfs_handle_struct *handle,
TALLOC_FREE(parent_dir);
- vfs_ChDir(conn, conn->connectpath);
+ if (saved_dir) {
+ vfs_ChDir(conn, saved_dir);
+ }
if (saved_errno) {
errno = saved_errno;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list