[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-3481-g44e0e83
Jeremy Allison
jra at samba.org
Fri Feb 20 16:26:10 GMT 2009
The branch, v3-2-test has been updated
via 44e0e830c4c413054bdb30a62629993c4391c492 (commit)
from 0d68e3d54b8f0bf2861edc7ac3b26c2f48f242eb (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 44e0e830c4c413054bdb30a62629993c4391c492
Author: Jeremy Allison <jra at samba.org>
Date: Fri Feb 20 08:25:29 2009 -0800
Fix bug #6133 - Cannot delete non-ACL files on Solaris/ZFS/NFSv4 ACL filesystem.
As the NFSv4 ACL mapping code doesn't map write directory into the DELETE_CHILD
permission bit (which we require before allowing a delete) no one can delete
files without an explicit DELETE_CHILD bit set on the directory. Add this mapping.
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source/modules/nfs4_acls.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/modules/nfs4_acls.c b/source/modules/nfs4_acls.c
index bf25c45..5c7700e 100644
--- a/source/modules/nfs4_acls.c
+++ b/source/modules/nfs4_acls.c
@@ -203,6 +203,7 @@ static int smbacl4_fGetFileOwner(files_struct *fsp, SMB_STRUCT_STAT *psbuf)
static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx, SMB4ACL_T *acl, /* in */
DOM_SID *psid_owner, /* in */
DOM_SID *psid_group, /* in */
+ bool is_directory, /* in */
SEC_ACE **ppnt_ace_list, /* out */
int *pgood_aces /* out */
)
@@ -261,6 +262,9 @@ static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx, SMB4ACL_T *acl, /* in */
DEBUG(10, ("mapped %d to %s\n", ace->who.id,
sid_string_dbg(&sid)));
+ if (is_directory && (ace->aceMask & SMB_ACE4_ADD_FILE)) {
+ ace->aceMask |= SMB_ACE4_DELETE_CHILD;
+ }
init_sec_access(&mask, ace->aceMask);
init_sec_ace(&nt_ace_list[good_aces++], &sid,
ace->aceType, mask,
@@ -292,7 +296,8 @@ static NTSTATUS smb_get_nt_acl_nfs4_common(const SMB_STRUCT_STAT *sbuf,
uid_to_sid(&sid_owner, sbuf->st_uid);
gid_to_sid(&sid_group, sbuf->st_gid);
- if (smbacl4_nfs42win(mem_ctx, acl, &sid_owner, &sid_group, &nt_ace_list, &good_aces)==False) {
+ if (smbacl4_nfs42win(mem_ctx, acl, &sid_owner, &sid_group, S_ISDIR(sbuf->st_mode),
+ &nt_ace_list, &good_aces)==False) {
DEBUG(8,("smbacl4_nfs42win failed\n"));
return map_nt_error_from_unix(errno);
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list