From 1e4a4c4d6e8ce13378cfa54730159b19911af8a1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 30 Dec 2004 02:38:44 +0000 Subject: [PATCH] r4405: added acl inheritance to the mkdir and t2mkdir backends. (This used to be commit b44d4d17df8af4941740e5d5e0842ca01d8f403c) --- source4/ntvfs/posix/pvfs_mkdir.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/source4/ntvfs/posix/pvfs_mkdir.c b/source4/ntvfs/posix/pvfs_mkdir.c index c4c03f3ad48..14fffb6a2e4 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; } -- 2.34.1