# HG changeset patch # User Gordon Ross # Date 1509656694 14400 # Node ID 55e229ed43d664866d7b3b5b61af5d971faa95ae # Parent f50b088fc201b62d39a2ad6462d3880c43705534 10988 SMB should not create in directories marked delete-on-close Reviewed by: Matt Barden Reviewed by: Evan Layton Approved by: Garrett D'Amore diff -r f50b088fc201 -r 55e229ed43d6 usr/src/uts/common/fs/smbsrv/smb_common_open.c --- 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. */