changeset 21391:55e229ed43d6

10988 SMB should not create in directories marked delete-on-close Reviewed by: Matt Barden <matt.barden@nexenta.com> Reviewed by: Evan Layton <evan.layton@nexenta.com> Approved by: Garrett D'Amore <garrett@damore.org>
author Gordon Ross <gwr@nexenta.com>
date Thu, 02 Nov 2017 17:04:54 -0400
parents f50b088fc201
children f61333f502f3
files usr/src/uts/common/fs/smbsrv/smb_common_open.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/fs/smbsrv/smb_common_open.c	Thu Apr 13 16:44:19 2017 -0400
+++ b/usr/src/uts/common/fs/smbsrv/smb_common_open.c	Thu Nov 02 17:04:54 2017 -0400
@@ -702,6 +702,14 @@
 		}
 
 		/*
+		 * Don't create in directories marked "Delete on close".
+		 */
+		if (dnode->flags & NODE_FLAGS_DELETE_ON_CLOSE) {
+			smb_node_release(dnode);
+			return (NT_STATUS_DELETE_PENDING);
+		}
+
+		/*
 		 * lock the parent dir node in case another create
 		 * request to the same parent directory comes in.
 		 */