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>
Mon, 15 Feb 2016 10:24:24 +0000 (11:24 +0100)
commit4526ba628ed7ee2bbd6751fb0155efff0b970dba
treecef2e94858c4b0617b8c6fc32106228df5cb6cd6
parentebb7d6602bd4c8f86e8d47e0581160f6d900ede9
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