summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-02-24 01:46:24 +0000
committerJeremy Allison <jra@samba.org>2004-02-24 01:46:24 +0000
commitf96e84c682bac64713841c8008193de5baf59993 (patch)
treef57ab263e954bde2a31700d9d2f433b585fb44d8 /source3
parent5447f1f4677bd4a3b9da43a835dd8c662ed86bfa (diff)
downloadsamba-f96e84c682bac64713841c8008193de5baf59993.tar.gz
samba-f96e84c682bac64713841c8008193de5baf59993.tar.bz2
samba-f96e84c682bac64713841c8008193de5baf59993.zip
Ensure '.' and '..' don't match in delete requests.
Jeremy. (This used to be commit 1b0d54170a2e3e61fc9bdedec6b10c8b7728a395)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/reply.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 26c107e17a..0fe3be0752 100644
--- a/source3/smbd/reply.c
+++ b/source3/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;