svn commit: samba r5509 - in trunk/source/smbd: .
jra at samba.org
jra at samba.org
Tue Feb 22 20:55:17 GMT 2005
Author: jra
Date: 2005-02-22 20:55:17 +0000 (Tue, 22 Feb 2005)
New Revision: 5509
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5509
Log:
Optimisation to only do can_delete check if client asks for FILE_SHARE_DELETE.
Not completely correct but will catch the XP SP2 problem.
Jeremy.
Modified:
trunk/source/smbd/nttrans.c
Changeset:
Modified: trunk/source/smbd/nttrans.c
===================================================================
--- trunk/source/smbd/nttrans.c 2005-02-22 20:54:06 UTC (rev 5508)
+++ trunk/source/smbd/nttrans.c 2005-02-22 20:55:17 UTC (rev 5509)
@@ -782,7 +782,16 @@
}
}
+#if 0
+ /* This is the correct thing to do (check every time) but can_delete is
+ expensive (it may have to read the parent directory permissions). So
+ for now we're not doing it unless we have a strong hint the client
+ is really going to delete this file. */
if (desired_access & DELETE_ACCESS) {
+#else
+ /* Setting FILE_SHARE_DELETE is the hint. */
+ if ((share_access & FILE_SHARE_DELETE) && (desired_access & DELETE_ACCESS)) {
+#endif
status = can_delete(conn, fname, file_attributes, bad_path, True);
/* We're only going to fail here if it's access denied, as that's the
only error we care about for "can we delete this ?" questions. */
More information about the samba-cvs
mailing list