summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-01-24 13:06:11 -0800
committerJeremy Allison <jra@samba.org>2008-01-24 13:06:11 -0800
commit47a8e77513686bbc492bbfdebbbd0bfb7f786063 (patch)
tree5b1f7c91d8938fe3d58065167b25116fa50d601f /source3
parent70e1ce640370eddb3c3e4f16cb6ae86c9d8e3a5e (diff)
downloadsamba-47a8e77513686bbc492bbfdebbbd0bfb7f786063.tar.gz
samba-47a8e77513686bbc492bbfdebbbd0bfb7f786063.tar.bz2
samba-47a8e77513686bbc492bbfdebbbd0bfb7f786063.zip
The checks for OI and CI were just wrong.... Fix them. Thanks to
Jim for testing this. Jeremy. (This used to be commit e898789e0d819df05b14bcedfa1d230c7a983440)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/posix_acls.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index 323d6cadb2..40979cd6a2 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -3293,20 +3293,15 @@ static NTSTATUS append_parent_acl(files_struct *fsp,
/* Finally append any inherited ACEs. */
for (j = 0; j < parent_sd->dacl->num_aces; j++) {
SEC_ACE *se = &parent_sd->dacl->aces[j];
- uint32 i_flags = se->flags & (SEC_ACE_FLAG_OBJECT_INHERIT|
- SEC_ACE_FLAG_CONTAINER_INHERIT|
- SEC_ACE_FLAG_INHERIT_ONLY);
if (fsp->is_directory) {
- if (i_flags == SEC_ACE_FLAG_OBJECT_INHERIT) {
- /* Should only apply to a file - ignore. */
+ if (!(se->flags & SEC_ACE_FLAG_CONTAINER_INHERIT)) {
+ /* Doesn't apply to a directory - ignore. */
continue;
}
} else {
- if ((i_flags & (SEC_ACE_FLAG_OBJECT_INHERIT|
- SEC_ACE_FLAG_INHERIT_ONLY)) !=
- SEC_ACE_FLAG_OBJECT_INHERIT) {
- /* Should not apply to a file - ignore. */
+ if (!(se->flags & SEC_ACE_FLAG_OBJECT_INHERIT)) {
+ /* Doesn't apply to a file - ignore. */
continue;
}
}