diff options
author | Jeremy Allison <jra@samba.org> | 2006-01-16 05:47:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:06:09 -0500 |
commit | 2dd7fd8f69ea06ad234c3354493052ef5a147c03 (patch) | |
tree | 29f6737a948ae2802519e08772e8555976d11291 | |
parent | d67b72a0f220b5a41496498914c8e28733ced8a1 (diff) | |
download | samba-2dd7fd8f69ea06ad234c3354493052ef5a147c03.tar.gz samba-2dd7fd8f69ea06ad234c3354493052ef5a147c03.tar.bz2 samba-2dd7fd8f69ea06ad234c3354493052ef5a147c03.zip |
r12956: Fix for bug #3035 from SATOH Fumiyasu <fumiyas@miraclelinux.com>
On a Windows share, a file with read-only dosmode can be opened with
DELETE_ACCESS. But on a Samba share (delete readonly = no), it
fails with NT_STATUS_CANNOT_DELETE error.
This semantic causes a problem that a user can not
rename a file with read-only dosmode on a Samba share
from a Windows command prompt (i.e. cmd.exe, but can rename
from Windows Explorer).
Jeremy.
(This used to be commit dd185c7aa8de156dab58b065bf73905b2a29f40d)
-rw-r--r-- | source3/smbd/reply.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index d56e3c1f1c..69c71c74b5 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -1888,7 +1888,19 @@ NTSTATUS can_delete(connection_struct *conn, char *fname, uint32 dirtype, BOOL b return NT_STATUS_OBJECT_NAME_INVALID; #endif /* JRATEST */ - if (!lp_delete_readonly(SNUM(conn))) { + /* Fix for bug #3035 from SATOH Fumiyasu <fumiyas@miraclelinux.com> + + On a Windows share, a file with read-only dosmode can be opened with + DELETE_ACCESS. But on a Samba share (delete readonly = no), it + fails with NT_STATUS_CANNOT_DELETE error. + + This semantic causes a problem that a user can not + rename a file with read-only dosmode on a Samba share + from a Windows command prompt (i.e. cmd.exe, but can rename + from Windows Explorer). + */ + + if (!check_is_at_open && !lp_delete_readonly(SNUM(conn))) { if (fattr & aRONLY) { return NT_STATUS_CANNOT_DELETE; } |