svn commit: samba r5529 - in trunk/source/smbd: .
jra at samba.org
jra at samba.org
Thu Feb 24 01:03:26 GMT 2005
Author: jra
Date: 2005-02-24 01:03:25 +0000 (Thu, 24 Feb 2005)
New Revision: 5529
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5529
Log:
Keep the TRANS call up to date with the NTCreateX call.
Jeremy.
Modified:
trunk/source/smbd/nttrans.c
Changeset:
Modified: trunk/source/smbd/nttrans.c
===================================================================
--- trunk/source/smbd/nttrans.c 2005-02-24 00:26:24 UTC (rev 5528)
+++ trunk/source/smbd/nttrans.c 2005-02-24 01:03:25 UTC (rev 5529)
@@ -1342,11 +1342,21 @@
return set_bad_path_error(errno, bad_path, outbuf, ERRDOS,ERRbadpath);
}
+#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. */
- if (!NT_STATUS_IS_OK(status) && NT_STATUS_EQUAL(status,NT_STATUS_ACCESS_DENIED)) {
+ if (!NT_STATUS_IS_OK(status) && (NT_STATUS_EQUAL(status,NT_STATUS_ACCESS_DENIED) ||
+ NT_STATUS_EQUAL(status,NT_STATUS_CANNOT_DELETE))) {
restore_case_semantics(conn, file_attributes);
END_PROFILE(SMBntcreateX);
return ERROR_NT(status);
More information about the samba-cvs
mailing list