Restructure the ACL code some more, get the internal semantics
authorJeremy Allison <jra@samba.org>
Wed, 2 Dec 2009 23:02:28 +0000 (15:02 -0800)
committerJeremy Allison <jra@samba.org>
Wed, 2 Dec 2009 23:02:28 +0000 (15:02 -0800)
commit365c6b4ce0bd84bfb1d9cec03bc835b92b1c5af7
tree89510a69206825497e14a2af7eb1ae4787363dd9
parent1d013fd03295433698f2b301dbf8324a3db528eb
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.
source3/include/proto.h
source3/lib/secdesc.c
source3/modules/vfs_acl_common.c