diff options
author | Jeremy Allison <jra@samba.org> | 2007-11-12 11:39:35 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-11-12 11:39:35 -0800 |
commit | 86558e0376558f730ba1a650af2f8b545ad96b4d (patch) | |
tree | 050c61c584ea0ece4f23389193405afe8a08f158 | |
parent | d068bc64b6f16bc0b4a8170b56f6aadd487d7203 (diff) | |
download | samba-86558e0376558f730ba1a650af2f8b545ad96b4d.tar.gz samba-86558e0376558f730ba1a650af2f8b545ad96b4d.tar.bz2 samba-86558e0376558f730ba1a650af2f8b545ad96b4d.zip |
Fix bug #5073. Allow "delete readonly = yes" to correctly
override deletion of a file. Fix from David Shaw <dshaw@jabberwocky.com>
Jeremy.
(This used to be commit 5d1d650d192d4782421b5c3c2be1b632d4318279)
-rw-r--r-- | source3/smbd/nttrans.c | 3 |
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); |