]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Fix "map acl inherit" = yes
authorVolker Lendecke <vl@samba.org>
Wed, 1 Feb 2017 14:41:43 +0000 (14:41 +0000)
committerVolker Lendecke <vl@samba.org>
Wed, 1 Feb 2017 21:06:50 +0000 (22:06 +0100)
Brown-Paper-Bag bug in f85c2a6852a. The assignment contains a self-reference
in get_pai_flags which I missed.

Fix an uninitialized read.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12551
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Feb  1 22:06:50 CET 2017 on sn-devel-144

source3/smbd/posix_acls.c

index 9d02e8a315c660c112178ba8f04e48b40e3201f1..c8d2bb3b5aa3a8d81d53a57731d5860c148b0fe2 100644 (file)
@@ -2699,9 +2699,9 @@ static canon_ace *canonicalise_acl(struct connection_struct *conn,
                        .attr = ALLOW_ACE,
                        .trustee = sid,
                        .unix_ug = unix_ug,
-                       .owner_type = owner_type,
-                       .ace_flags = get_pai_flags(pal, ace, is_default_acl)
+                       .owner_type = owner_type
                };
+               ace->ace_flags = get_pai_flags(pal, ace, is_default_acl);
 
                DLIST_ADD(l_head, ace);
        }