r4405: added acl inheritance to the mkdir and t2mkdir backends.
authorAndrew Tridgell <tridge@samba.org>
Thu, 30 Dec 2004 02:38:44 +0000 (02:38 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:07:44 +0000 (13:07 -0500)
(This used to be commit b44d4d17df8af4941740e5d5e0842ca01d8f403c)

source4/ntvfs/posix/pvfs_mkdir.c

index c4c03f3ad4807a066185ff3a5077d5dc75e4e471..14fffb6a2e4fb736d6833a66a3f996869a697642 100644 (file)
@@ -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;
 }