r20635: Add placeholder to ensure we don't go into the
authorJeremy Allison <jra@samba.org>
Tue, 9 Jan 2007 18:48:38 +0000 (18:48 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:17:00 +0000 (12:17 -0500)
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

index da7fadae3bba8110621102e1e5c85587a74bf69e..b3df8acf1156ba428c94f4e9321703446ca6f999 100644 (file)
@@ -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,"*");