svn commit: samba r12956 - in branches/SAMBA_3_0/source/smbd: .

jra at samba.org jra at samba.org
Mon Jan 16 05:47:40 GMT 2006


Author: jra
Date: 2006-01-16 05:47:39 +0000 (Mon, 16 Jan 2006)
New Revision: 12956

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12956

Log:
Fix for bug #3035 from SATOH Fumiyasu <fumiyas at 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.

Modified:
   branches/SAMBA_3_0/source/smbd/reply.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/reply.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/reply.c	2006-01-16 03:33:57 UTC (rev 12955)
+++ branches/SAMBA_3_0/source/smbd/reply.c	2006-01-16 05:47:39 UTC (rev 12956)
@@ -1888,7 +1888,19 @@
 		return NT_STATUS_OBJECT_NAME_INVALID;
 #endif /* JRATEST */
 
-	if (!lp_delete_readonly(SNUM(conn))) {
+	/* Fix for bug #3035 from SATOH Fumiyasu <fumiyas at 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;
 		}



More information about the samba-cvs mailing list