s3: smbd: posix_acls: Fix check for setting u:g:o entry on a filesystem with no ACL...
authorJeremy Allison <jra@samba.org>
Tue, 9 Feb 2016 20:47:43 +0000 (12:47 -0800)
committerKarolin Seeger <kseeger@samba.org>
Tue, 16 Feb 2016 08:00:28 +0000 (09:00 +0100)
commitbf29f7d67a47e64d9c9212135e59081c748a8f4e
tree1c5de4e811f8b3f9c370dc788ed1a1bed39f0c27
parentbd140e69e4990858842df76b0ca42dc87a602666
s3: smbd: posix_acls: Fix check for setting u:g:o entry on a filesystem with no ACL support.

Since 4.0.x we add 2 additional ACE entries, one SMB_ACL_USER
and SMB_ACL_GROUP to match the existing SMB_ACL_USER_OBJ and
SMB_ACL_GROUP_OBJ entries. The two additional entries break
the simple "must have 3 entries" check done inside convert_canon_ace_to_posix_perms().
Replace this with a more complete test.

Problem and initial fix provided by <tcleamy@ucdavis.edu>

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10489

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Thu Feb 11 11:14:53 CET 2016 on sn-devel-144

(cherry picked from commit 5172bf0c5b0672c1479c2ad776460956aa469bca)
source3/smbd/posix_acls.c