1 7011577 Impossible to rename a file on a ZFS filesystem when installing 146364-01 (Samba 3.5.5) |
|
2 Fix bug #7909 - map SYNCHRONIZE acl permission statically in zfs_acl vfs module. |
|
3 |
|
4 diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c |
|
5 index 1913946..e2f9fe3 100644 |
|
6 --- a/source3/modules/nfs4_acls.c |
|
7 +++ b/source3/modules/nfs4_acls.c |
|
8 @@ -280,7 +280,9 @@ static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx, SMB4ACL_T *theacl, /* in */ |
|
9 DEBUG(10, ("mapped ace flags: 0x%x => 0x%x\n", |
|
10 ace->aceFlags, mapped_ace_flags)); |
|
11 |
|
12 - mask = ace->aceMask; |
|
13 + /* Windows clients expect SYNC on acls to |
|
14 + correctly allow rename. See bug #7909. */ |
|
15 + mask = ace->aceMask | SMB_ACE4_SYNCHRONIZE; |
|
16 init_sec_ace(&nt_ace_list[good_aces++], &sid, |
|
17 ace->aceType, mask, |
|
18 mapped_ace_flags); |
|
19 diff --git a/source3/modules/vfs_zfsacl.c b/source3/modules/vfs_zfsacl.c |
|
20 index 98c9bcf..8a2c378 100644 |
|
21 --- a/source3/modules/vfs_zfsacl.c |
|
22 +++ b/source3/modules/vfs_zfsacl.c |
|
23 @@ -124,6 +124,9 @@ static bool zfs_process_smbacl(files_struct *fsp, SMB4ACL_T *smbacl) |
|
24 acebuf[i].a_type = aceprop->aceType; |
|
25 acebuf[i].a_flags = aceprop->aceFlags; |
|
26 acebuf[i].a_access_mask = aceprop->aceMask; |
|
27 + /* SYNC on acls is a no-op on ZFS. |
|
28 + See bug #7909. */ |
|
29 + acebuf[i].a_access_mask &= ~SMB_ACE4_SYNCHRONIZE; |
|
30 acebuf[i].a_who = aceprop->who.id; |
|
31 if(aceprop->flags & SMB_ACE4_ID_SPECIAL) { |
|
32 switch(aceprop->who.special_id) { |
|