summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-12-30 02:38:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:44 -0500
commit1e4a4c4d6e8ce13378cfa54730159b19911af8a1 (patch)
tree4cc76d89449819fea421351df79e857f75719356 /source4/ntvfs
parent8631bf2bcc4ce79e2448a7463c8ea7a6b7695c4e (diff)
downloadsamba-1e4a4c4d6e8ce13378cfa54730159b19911af8a1.tar.gz
samba-1e4a4c4d6e8ce13378cfa54730159b19911af8a1.tar.bz2
samba-1e4a4c4d6e8ce13378cfa54730159b19911af8a1.zip
r4405: added acl inheritance to the mkdir and t2mkdir backends.
(This used to be commit b44d4d17df8af4941740e5d5e0842ca01d8f403c)
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/posix/pvfs_mkdir.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_mkdir.c b/source4/ntvfs/posix/pvfs_mkdir.c
index c4c03f3ad4..14fffb6a2e 100644
--- a/source4/ntvfs/posix/pvfs_mkdir.c
+++ b/source4/ntvfs/posix/pvfs_mkdir.c
@@ -60,6 +60,13 @@ static NTSTATUS pvfs_t2mkdir(struct pvfs_state *pvfs,
return NT_STATUS_INTERNAL_ERROR;
}
+ /* setup an inherited acl from the parent */
+ status = pvfs_acl_inherit(pvfs, req, name, -1);
+ if (!NT_STATUS_IS_OK(status)) {
+ rmdir(name->full_name);
+ return status;
+ }
+
/* setup any EAs that were asked for */
status = pvfs_setfileinfo_ea_set(pvfs, name, -1,
md->t2mkdir.in.num_eas,
@@ -109,6 +116,13 @@ NTSTATUS pvfs_mkdir(struct ntvfs_module_context *ntvfs,
pvfs_xattr_unlink_hook(pvfs, name->full_name);
+ /* setup an inherited acl from the parent */
+ status = pvfs_acl_inherit(pvfs, req, name, -1);
+ if (!NT_STATUS_IS_OK(status)) {
+ rmdir(name->full_name);
+ return status;
+ }
+
return NT_STATUS_OK;
}