--- a/source3/smbd/open.c 2016-02-02 09:34:55.000000000 +0100 +++ b/source3/smbd/open.c 2016-09-29 15:02:24.950000000 +0200 @@ -3151,7 +3151,7 @@ /* Handle strange delete on close create semantics. */ if (create_options & FILE_DELETE_ON_CLOSE) { - status = can_set_delete_on_close(fsp, new_dos_attributes); + status = can_set_delete_on_close(fsp, existing_dos_attributes); if (!NT_STATUS_IS_OK(status)) { /* Remember to delete the mode we just added. */