svn commit: samba r23909 - in branches: SAMBA_3_2/source/smbd
SAMBA_3_2_0/source/smbd
jra at samba.org
jra at samba.org
Tue Jul 17 02:06:42 GMT 2007
Author: jra
Date: 2007-07-17 02:06:38 +0000 (Tue, 17 Jul 2007)
New Revision: 23909
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23909
Log:
Get closer to passing the cthon tests for delete open file.
It matters how the target is open.
Jeremy.
Modified:
branches/SAMBA_3_2/source/smbd/reply.c
branches/SAMBA_3_2_0/source/smbd/reply.c
Changeset:
Modified: branches/SAMBA_3_2/source/smbd/reply.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/reply.c 2007-07-17 00:50:48 UTC (rev 23908)
+++ branches/SAMBA_3_2/source/smbd/reply.c 2007-07-17 02:06:38 UTC (rev 23909)
@@ -4447,9 +4447,12 @@
return NT_STATUS_OBJECT_NAME_COLLISION;
}
- if (dst_exists && file_find_di_first(file_id_sbuf(&sbuf1)) != NULL) {
- DEBUG(3, ("rename_internals_fsp: Target file open\n"));
- return NT_STATUS_ACCESS_DENIED;
+ if (dst_exists) {
+ files_struct *dst_fsp = file_find_di_first(file_id_sbuf(&sbuf1));
+ if (dst_fsp && !(dst_fsp->share_access & FILE_SHARE_DELETE)) {
+ DEBUG(3, ("rename_internals_fsp: Target file open\n"));
+ return NT_STATUS_ACCESS_DENIED;
+ }
}
/* Ensure we have a valid stat struct for the source. */
Modified: branches/SAMBA_3_2_0/source/smbd/reply.c
===================================================================
--- branches/SAMBA_3_2_0/source/smbd/reply.c 2007-07-17 00:50:48 UTC (rev 23908)
+++ branches/SAMBA_3_2_0/source/smbd/reply.c 2007-07-17 02:06:38 UTC (rev 23909)
@@ -4445,9 +4445,12 @@
return NT_STATUS_OBJECT_NAME_COLLISION;
}
- if (dst_exists && file_find_di_first(file_id_sbuf(&sbuf1)) != NULL) {
- DEBUG(3, ("rename_internals_fsp: Target file open\n"));
- return NT_STATUS_ACCESS_DENIED;
+ if (dst_exists) {
+ files_struct *dst_fsp = file_find_di_first(file_id_sbuf(&sbuf1));
+ if (dst_fsp && !(dst_fsp->share_access & FILE_SHARE_DELETE)) {
+ DEBUG(3, ("rename_internals_fsp: Target file open\n"));
+ return NT_STATUS_ACCESS_DENIED;
+ }
}
/* Ensure we have a valid stat struct for the source. */
More information about the samba-cvs
mailing list