[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Sat Jan 16 18:24:48 MST 2010
The branch, master has been updated
via 98a495f... Modification of fix for bug 6876 - Delete of an object whose parent folder does not have delete rights fails even if the delete right is set on the object
from dde836a... s4-drs: allow for security bypass for DsReplicaGetInfo
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 98a495f1e674b7562a3d8b5dfc958ee95d256896
Author: Jeremy Allison <jra at samba.org>
Date: Sat Jan 16 17:03:06 2010 -0800
Modification of fix for bug 6876 - Delete of an object whose parent folder does not have delete rights fails even if the delete right is set on the object
Suggested by Volker. Reduce the surface area of the
become_root() unbecome_root() code to reduce the chance
of errors.
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source3/modules/vfs_acl_common.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index aeb9ce3..30a59e2 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -821,11 +821,14 @@ static int acl_common_remove_object(vfs_handle_struct *handle,
goto out;
}
+ become_root();
if (is_directory) {
ret = SMB_VFS_NEXT_RMDIR(handle, final_component);
} else {
ret = SMB_VFS_NEXT_UNLINK(handle, &local_fname);
}
+ unbecome_root();
+
if (ret == -1) {
saved_errno = errno;
}
@@ -854,12 +857,9 @@ static int rmdir_acl_common(struct vfs_handle_struct *handle,
return ret;
}
- become_root();
- ret = acl_common_remove_object(handle,
+ return acl_common_remove_object(handle,
path,
true);
- unbecome_root();
- return ret;
}
static NTSTATUS create_file_acl_common(struct vfs_handle_struct *handle,
@@ -977,10 +977,7 @@ static int unlink_acl_common(struct vfs_handle_struct *handle,
return ret;
}
- become_root();
- ret = acl_common_remove_object(handle,
+ return acl_common_remove_object(handle,
smb_fname->base_name,
false);
- unbecome_root();
- return ret;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list