summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@sernet.de>2007-12-01 15:01:01 +0100
committerJeremy Allison <jra@samba.org>2007-12-01 10:43:54 -0800
commit5066f7c878001522baf66fd3b73871df188827cd (patch)
treea8c99071508652146ca0a0cc3d6b74b238dc3477 /source3
parentbbf2cb6da994ac73dd7ea26d81f724aa04b5a3cb (diff)
downloadsamba-5066f7c878001522baf66fd3b73871df188827cd.tar.gz
samba-5066f7c878001522baf66fd3b73871df188827cd.tar.bz2
samba-5066f7c878001522baf66fd3b73871df188827cd.zip
In nttransact_create, we also need to check for delete readonly
(This used to be commit f4cc9cab518e97c1049aaad7516aba212ae15c95)
Diffstat (limited to 'source3')
-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 d03abaeadb..9ff1cac140 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -1535,7 +1535,8 @@ static void call_nt_transact_create(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);