From 96b3242f124d60fd8d8b6f5a34b57c26c42dfd14 Mon Sep 17 00:00:00 2001 From: Zack Kirsch Date: Tue, 17 Feb 2009 21:03:33 -0800 Subject: [PATCH] s3 OneFS: Fixes "inherit permissions" and "nt acl support" for Onefs. --- source3/modules/onefs_system.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/source3/modules/onefs_system.c b/source3/modules/onefs_system.c index b17cfe9b11e..6f93d9ff971 100644 --- a/source3/modules/onefs_system.c +++ b/source3/modules/onefs_system.c @@ -93,6 +93,7 @@ int onefs_sys_create_file(connection_struct *conn, int secinfo = 0; int ret_fd = -1; uint32_t onefs_dos_attributes; + struct ifs_createfile_flags cf_flags = CF_FLAGS_NONE; /* Setup security descriptor and get secinfo. */ if (sd != NULL) { @@ -143,10 +144,19 @@ int onefs_sys_create_file(connection_struct *conn, smlock_dump(10, psml); + /** + * Deal with kernel creating Default ACLs. (Isilon bug 47447.) + * + * 1) "nt acl support = no", default_acl = no + * 2) "inherit permissions = yes", default_acl = no + */ + if (lp_nt_acl_support(SNUM(conn)) && !lp_inherit_perms(SNUM(conn))) + cf_flags = cf_flags_or(cf_flags, CF_FLAGS_DEFAULT_ACL); + ret_fd = ifs_createfile(base_fd, path, (enum ifs_ace_rights)open_access_mask, flags & ~O_ACCMODE, mode, onefs_oplock, id, psml, secinfo, pifs_sd, onefs_dos_attributes, - &onefs_granted_oplock); + cf_flags, &onefs_granted_oplock); DEBUG(10,("onefs_sys_create_file(%s): ret_fd = %d, " "onefs_granted_oplock = %s\n", -- 2.34.1