mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
The checks for OI and CI were just wrong.... Fix them. Thanks to
Jim for testing this. Jeremy.
This commit is contained in:
parent
f5e50f42e7
commit
e898789e0d
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user