svn commit: samba r20528 - in branches/SAMBA_3_0_24/source/smbd: .
jra at samba.org
jra at samba.org
Thu Jan 4 20:29:24 GMT 2007
Author: jra
Date: 2007-01-04 20:29:23 +0000 (Thu, 04 Jan 2007)
New Revision: 20528
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20528
Log:
This fix now naturally follows : (from VL).
"Both remaining calls of can_delete called it with check_is_at_open==False,
remove that parameter."
Jeremy.
Modified:
branches/SAMBA_3_0_24/source/smbd/reply.c
Changeset:
Modified: branches/SAMBA_3_0_24/source/smbd/reply.c
===================================================================
--- branches/SAMBA_3_0_24/source/smbd/reply.c 2007-01-04 20:24:15 UTC (rev 20527)
+++ branches/SAMBA_3_0_24/source/smbd/reply.c 2007-01-04 20:29:23 UTC (rev 20528)
@@ -1892,8 +1892,7 @@
********************************************************************/
static NTSTATUS can_delete(connection_struct *conn, char *fname,
- uint32 dirtype, BOOL bad_path,
- BOOL check_is_at_open)
+ uint32 dirtype, BOOL bad_path)
{
SMB_STRUCT_STAT sbuf;
uint32 fattr;
@@ -1941,7 +1940,7 @@
from Windows Explorer).
*/
- if (!check_is_at_open && !lp_delete_readonly(SNUM(conn))) {
+ if (!lp_delete_readonly(SNUM(conn))) {
if (fattr & aRONLY) {
return NT_STATUS_CANNOT_DELETE;
}
@@ -1950,29 +1949,22 @@
return NT_STATUS_NO_SUCH_FILE;
}
- if (check_is_at_open) {
- if (!can_delete_file_in_directory(conn, fname)) {
- return NT_STATUS_ACCESS_DENIED;
- }
- } else {
- /* On open checks the open itself will check the share mode, so
- don't do it here as we'll get it wrong. */
+ /* On open checks the open itself will check the share mode, so
+ don't do it here as we'll get it wrong. */
- status = open_file_ntcreate(conn, fname, &sbuf,
- DELETE_ACCESS,
- FILE_SHARE_NONE,
- FILE_OPEN,
- 0,
- FILE_ATTRIBUTE_NORMAL,
- 0,
- NULL, &fsp);
+ status = open_file_ntcreate(conn, fname, &sbuf,
+ DELETE_ACCESS,
+ FILE_SHARE_NONE,
+ FILE_OPEN,
+ 0,
+ FILE_ATTRIBUTE_NORMAL,
+ 0,
+ NULL, &fsp);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
+ if (NT_STATUS_IS_OK(status)) {
close_file(fsp,NORMAL_CLOSE);
}
- return NT_STATUS_OK;
+ return status;
}
/****************************************************************************
@@ -2020,7 +2012,7 @@
if (!has_wild) {
pstrcat(directory,"/");
pstrcat(directory,mask);
- error = can_delete(conn,directory,dirtype,bad_path,False);
+ error = can_delete(conn,directory,dirtype,bad_path);
if (!NT_STATUS_IS_OK(error))
return error;
@@ -2078,7 +2070,8 @@
}
slprintf(fname,sizeof(fname)-1, "%s/%s",directory,dname);
- error = can_delete(conn,fname,dirtype,bad_path,False);
+ error = can_delete(conn, fname, dirtype,
+ bad_path);
if (!NT_STATUS_IS_OK(error)) {
continue;
}
More information about the samba-cvs
mailing list