r16616: Klocwork #2025. Stop null deref. I actually don't
authorJeremy Allison <jra@samba.org>
Wed, 28 Jun 2006 05:00:09 +0000 (05:00 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:19:03 +0000 (11:19 -0500)
think this can happen in real life but the code is
too complicated to be sure....
Jerry please merge this for 3.0.23.
Jeremy.
(This used to be commit 1e5042d4c0d1a0d0a5cfbcb0d47815e1510ee52a)

source3/smbd/posix_acls.c

index 40cb6698a02fe34eab60ef04b50a1069f8e58388..6e403dba92ad062d917007a83f6d2660da12d883 100644 (file)
@@ -1483,7 +1483,7 @@ Deny entry after Allow entry. Failing to set on file %s.\n", fsp->fsp_name ));
                 * Only add to the file ACL if not inherit only.
                 */
 
-               if (!(psa->flags & SEC_ACE_FLAG_INHERIT_ONLY)) {
+               if (current_ace && !(psa->flags & SEC_ACE_FLAG_INHERIT_ONLY)) {
                        DLIST_ADD_END(file_ace, current_ace, tmp_ace);
 
                        /*