summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-01-08 21:08:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:59 -0500
commit1b50bcc9c8af2a7b2a085078e2df62c4ff648d79 (patch)
treef2423e336b15d460976c7b5ca475ee6cd20527f6
parenta9e3624bbcb240104af186233ba2de87586d77d3 (diff)
downloadsamba-1b50bcc9c8af2a7b2a085078e2df62c4ff648d79.tar.gz
samba-1b50bcc9c8af2a7b2a085078e2df62c4ff648d79.tar.bz2
samba-1b50bcc9c8af2a7b2a085078e2df62c4ff648d79.zip
r20618: Fix a bug in bad_path handling that also exists in 3.0.23: For reply_unlink
under Linux we returned NT_STATUS_NOT_A_DIRECTORY. This is because in the bad_path==True condition lstat(2) returns ENOTDIR and not ENOENT. Not sure if we want to necessarily replicate the INVALID_PARAMETER here, but this is what W2k3 does. Jeremy, I tried to call you, but you were not around. So I'll leave it up to you to merge this. Volker (This used to be commit b1edc3d053104204b966eed67d070ad5da40f17b)
-rw-r--r--source3/smbd/reply.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index cc181223f2..b3ee18befe 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -1995,6 +1995,11 @@ NTSTATUS unlink_internals(connection_struct *conn, uint32 dirtype,
*directory = *mask = 0;
rc = unix_convert(name,conn,0,&bad_path,&sbuf);
+ if (bad_path) {
+ return has_wild
+ ? NT_STATUS_INVALID_PARAMETER
+ : NT_STATUS_OBJECT_PATH_NOT_FOUND;
+ }
/*
* Feel my pain, this code needs rewriting *very* badly! -- vl