summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-01-08 21:13:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:59 -0500
commitdbac39f74ebd6a906b6c2b83e6f0a406788f5620 (patch)
tree4ec12cb9715a9d04e1a49b1286c0a9cc35a8d6b3
parent1b50bcc9c8af2a7b2a085078e2df62c4ff648d79 (diff)
downloadsamba-dbac39f74ebd6a906b6c2b83e6f0a406788f5620.tar.gz
samba-dbac39f74ebd6a906b6c2b83e6f0a406788f5620.tar.bz2
samba-dbac39f74ebd6a906b6c2b83e6f0a406788f5620.zip
r20619: bad_path is handled somewhere else, so can_delete does not need it anymore
(This used to be commit 1798987128be579a1a4574294a7c3094040ebaf2)
-rw-r--r--source3/smbd/reply.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index b3ee18befe..dfea8bcc0f 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -1899,7 +1899,7 @@ static NTSTATUS can_rename(connection_struct *conn, char *fname, uint16 dirtype,
********************************************************************/
static NTSTATUS can_delete(connection_struct *conn, char *fname,
- uint32 dirtype, BOOL bad_path)
+ uint32 dirtype)
{
SMB_STRUCT_STAT sbuf;
uint32 fattr;
@@ -1913,13 +1913,6 @@ static NTSTATUS can_delete(connection_struct *conn, char *fname,
}
if (SMB_VFS_LSTAT(conn,fname,&sbuf) != 0) {
- if(errno == ENOENT) {
- if (bad_path) {
- return NT_STATUS_OBJECT_PATH_NOT_FOUND;
- } else {
- return NT_STATUS_OBJECT_NAME_NOT_FOUND;
- }
- }
return map_nt_error_from_unix(errno);
}
@@ -2031,7 +2024,7 @@ NTSTATUS unlink_internals(connection_struct *conn, uint32 dirtype,
if (!has_wild) {
pstrcat(directory,"/");
pstrcat(directory,mask);
- error = can_delete(conn,directory,dirtype,bad_path);
+ error = can_delete(conn,directory,dirtype);
if (!NT_STATUS_IS_OK(error))
return error;
@@ -2092,8 +2085,7 @@ NTSTATUS unlink_internals(connection_struct *conn, uint32 dirtype,
}
slprintf(fname,sizeof(fname)-1, "%s/%s",directory,dname);
- error = can_delete(conn, fname, dirtype,
- bad_path);
+ error = can_delete(conn, fname, dirtype);
if (!NT_STATUS_IS_OK(error)) {
continue;
}