summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarolin Seeger <kseeger@samba.org>2008-11-17 14:02:55 +0100
committerKarolin Seeger <kseeger@samba.org>2008-11-17 14:02:55 +0100
commitdd9020a6da0a9d897d5f41481fbaa4a601efce8f (patch)
treeb598c89c32c096085ec7e31fabb1daa2bf55678e
parent6a8b50b699850ccd774a3f031ad195ce6e41da83 (diff)
downloadsamba-dd9020a6da0a9d897d5f41481fbaa4a601efce8f.tar.gz
samba-dd9020a6da0a9d897d5f41481fbaa4a601efce8f.tar.xz
samba-dd9020a6da0a9d897d5f41481fbaa4a601efce8f.zip
Revert "Fix bug #5797 - Moving readonly files fails. Reported by infomail@lordb.de."
This reverts commit 7292c322ca70e9df82e020f45f1510e9ca02efbc.
-rw-r--r--source/smbd/open.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/smbd/open.c b/source/smbd/open.c
index c21ad20312f..afe8d5e9b3a 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -2662,7 +2662,9 @@ NTSTATUS create_file_unixpath(connection_struct *conn,
&& (create_disposition != FILE_CREATE)
&& (share_access & FILE_SHARE_DELETE)
&& (access_mask & DELETE_ACCESS)
- && (!can_delete_file_in_directory(conn, fname))) {
+ && (((dos_mode(conn, fname, &sbuf) & FILE_ATTRIBUTE_READONLY)
+ && !lp_delete_readonly(SNUM(conn)))
+ || !can_delete_file_in_directory(conn, fname))) {
status = NT_STATUS_ACCESS_DENIED;
goto fail;
}