[SCM] Samba Shared Repository - branch v3-0-test updated -
release-3-0-28-108-gfc05089
Jeremy Allison
jra at samba.org
Fri Jan 25 02:18:38 GMT 2008
The branch, v3-0-test has been updated
via fc0508922417e9ef9a4450067d29d15121b52902 (commit)
from 0e7886a3ceb8406c5e331a66c0e6fb6ab4493a3e (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-0-test
- Log -----------------------------------------------------------------
commit fc0508922417e9ef9a4450067d29d15121b52902
Author: Jeremy Allison <jra at samba.org>
Date: Thu Jan 24 18:17:59 2008 -0800
Back port : Correctly set flags in ACE's inherited from parent.
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source/smbd/posix_acls.c | 40 +++++++++++++++++++++++++++++++++++++---
1 files changed, 37 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c
index ee7b05c..21ad422 100644
--- a/source/smbd/posix_acls.c
+++ b/source/smbd/posix_acls.c
@@ -3202,9 +3202,11 @@ static NTSTATUS append_parent_acl(files_struct *fsp,
/* Doesn't apply to a directory - ignore. */
DEBUG(10,("append_parent_acl: directory %s "
"ignoring non container "
- "inherit flags %u from parent %s\n",
+ "inherit flags %u on ACE with sid %s "
+ "from parent %s\n",
fsp->fsp_name,
(unsigned int)se->flags,
+ sid_string_static(&se->trustee),
parent_name));
continue;
}
@@ -3213,9 +3215,11 @@ static NTSTATUS append_parent_acl(files_struct *fsp,
/* Doesn't apply to a file - ignore. */
DEBUG(10,("append_parent_acl: file %s "
"ignoring non object "
- "inherit flags %u from parent %s\n",
+ "inherit flags %u on ACE with sid %s "
+ "from parent %s\n",
fsp->fsp_name,
(unsigned int)se->flags,
+ sid_string_static(&se->trustee),
parent_name));
continue;
}
@@ -3235,7 +3239,7 @@ static NTSTATUS append_parent_acl(files_struct *fsp,
if (k < psd->dacl->num_aces) {
/* SID matched. Ignore. */
DEBUG(10,("append_parent_acl: path %s "
- "ignoring protected sid %s "
+ "ignoring ACE with protected sid %s "
"from parent %s\n",
fsp->fsp_name,
sid_string_static(&se->trustee),
@@ -3249,7 +3253,37 @@ static NTSTATUS append_parent_acl(files_struct *fsp,
new_ace[i].flags &= ~(SEC_ACE_FLAG_VALID_INHERIT);
}
new_ace[i].flags |= SEC_ACE_FLAG_INHERITED_ACE;
+
+ if (fsp->is_directory) {
+ /*
+ * Strip off any inherit only. It's applied.
+ */
+ new_ace[i].flags &= ~(SEC_ACE_FLAG_INHERIT_ONLY);
+ if (se->flags & SEC_ACE_FLAG_NO_PROPAGATE_INHERIT) {
+ /* No further inheritance. */
+ new_ace[i].flags &=
+ ~(SEC_ACE_FLAG_CONTAINER_INHERIT|
+ SEC_ACE_FLAG_OBJECT_INHERIT);
+ }
+ } else {
+ /*
+ * Strip off any container or inherit
+ * flags, they can't apply to objects.
+ */
+ new_ace[i].flags &= ~(SEC_ACE_FLAG_CONTAINER_INHERIT|
+ SEC_ACE_FLAG_INHERIT_ONLY|
+ SEC_ACE_FLAG_NO_PROPAGATE_INHERIT);
+ }
+
i++;
+
+ DEBUG(10,("append_parent_acl: path %s "
+ "inheriting ACE with sid %s "
+ "from parent %s\n",
+ fsp->fsp_name,
+ sid_string_static(&se->trustee),
+ parent_name));
+
}
parent_sd->dacl->aces = new_ace;
--
Samba Shared Repository
More information about the samba-cvs
mailing list