From 1b0d54170a2e3e61fc9bdedec6b10c8b7728a395 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 24 Feb 2004 01:46:24 +0000 Subject: [PATCH] Ensure '.' and '..' don't match in delete requests. Jeremy. --- source/smbd/reply.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 26c107e17a2..0fe3be07522 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -1449,7 +1449,10 @@ NTSTATUS unlink_internals(connection_struct *conn, int dirtype, char *name) while ((dname = ReadDirName(dirptr))) { pstring fname; pstrcpy(fname,dname); - + + if((strcmp(fname, ".") == 0) || (strcmp(fname, "..")==0)) + continue; + if(!mask_match(fname, mask, case_sensitive)) continue;