From 1b50bcc9c8af2a7b2a085078e2df62c4ff648d79 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 8 Jan 2007 21:08:31 +0000 Subject: 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) --- source3/smbd/reply.c | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit