From b538c2b86b64220e0c105487a728cc5d0dacd633 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 9 Jan 2007 18:48:38 +0000 Subject: r20635: Add placeholder to ensure we don't go into the wcard unlink if bad_path was set. The error returned here is almost certainly incorrect and will need testing properly with smbtorture, but I don't want to forget about this path (yes Volker I know this is currently incorrect :-). Jeremy. (This used to be commit 06e20c287898d21e437ab117eb5eeeaf2420ba78) --- source3/smbd/reply.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index da7fadae3b..b3df8acf11 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -2038,6 +2038,17 @@ NTSTATUS unlink_internals(connection_struct *conn, uint32 dirtype, struct smb_Dir *dir_hnd = NULL; const char *dname; + /* Ensure we check bad_path in the wcard case. + * This may not be correct w.r.t. Windows (needs + * smbtorture test cases which will be forthcoming) + * but prevents us from continuing in the obvious + * bad path case. This is merely a placeholder. JRA. + */ + + if (!rc && bad_path) { + return NT_STATUS_OBJECT_PATH_NOT_FOUND; + } + if (strequal(mask,"????????.???")) pstrcpy(mask,"*"); -- cgit