Restructure the ACL code some more, get the internal semantics
commit6955103aaaee69b204886c2d34bdfdf16c46a29f
authorJeremy Allison <jra@samba.org>
Wed, 2 Dec 2009 23:02:28 +0000 (2 15:02 -0800)
committerKarolin Seeger <kseeger@samba.org>
Tue, 8 Dec 2009 08:15:23 +0000 (8 09:15 +0100)
tree8757e7329b1f242f087ea03f29bc5fa45cfacf59
parentc064b089109a2b8192d344a7faadbde9a2b0d194
Restructure the ACL code some more, get the internal semantics
right. The previous bugs were due to the fact that get_nt_acl_internal()
could return an NTSTATUS error if there was no stored ACL blob, but
otherwise would return the underlying ACL from the filysystem. Fix
this so it always returns a valid acl if it can, and if it does not
its an error to be reported back to the client. This then changes
the inherit acl code. Previously we were trying to match Windows
by setting a minimal ACL on a new file that didn't inherit anything
from a parent directory. This is silly - the returned ACL wouldn't
match the underlying UNIX permissions. The current code will correctly
inherit from a parent if a parent has any inheritable ACE entries
that apply to the new object, but will return a mapping from the
underlying UNIX permissions if the parent has no inheritable entries.
This makes much more sense for new files/directories.
Jeremy.
(cherry picked from commit 365c6b4ce0bd84bfb1d9cec03bc835b92b1c5af7)
(cherry picked from commit 3e1afbbae79ee23c6f3b701ae3bcb57156049787)
source3/include/proto.h
source3/lib/secdesc.c
source3/modules/vfs_acl_common.c