summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/nttrans.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 4bd4571171..f07d64eded 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -788,7 +788,8 @@ void reply_ntcreate_and_X(connection_struct *conn,
&& (create_disposition != FILE_CREATE)
&& (share_access & FILE_SHARE_DELETE)
&& (access_mask & DELETE_ACCESS)) {
- if ((dos_mode(conn, fname, &sbuf) & FILE_ATTRIBUTE_READONLY) ||
+ if (((dos_mode(conn, fname, &sbuf) & FILE_ATTRIBUTE_READONLY)
+ && !lp_delete_readonly(SNUM(conn))) ||
!can_delete_file_in_directory(conn, fname)) {
TALLOC_FREE(case_state);
reply_nterror(req, NT_STATUS_ACCESS_DENIED);