summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-01-09 18:48:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:00 -0500
commitb538c2b86b64220e0c105487a728cc5d0dacd633 (patch)
treeb529a7cc3cae7e1f7433b464ab9fe89475ba0d91
parent46fdae1b6b1b8e3285447193cb10e5a2a444d431 (diff)
downloadsamba-b538c2b86b64220e0c105487a728cc5d0dacd633.tar.gz
samba-b538c2b86b64220e0c105487a728cc5d0dacd633.tar.bz2
samba-b538c2b86b64220e0c105487a728cc5d0dacd633.zip
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)
-rw-r--r--source3/smbd/reply.c11
1 files changed, 11 insertions, 0 deletions
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,"*");