From: Stefan Metzmacher Date: Thu, 6 Aug 2009 19:16:38 +0000 (+0200) Subject: s3:smbd: don't ignore check_descend in get_dir_entry() X-Git-Tag: talloc-2.0.0~464^2~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8e419aab48ace1fe0d075e2a25935e650805a23c;p=thirdparty%2Fsamba.git s3:smbd: don't ignore check_descend in get_dir_entry() metze --- diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 642fb09362c..7acd349b721 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -875,6 +875,7 @@ bool get_dir_entry(TALLOC_CTX *ctx, if ((strcmp(mask,"*.*") == 0) || mask_match_search(filename,mask,False) || mangle_mask_match(conn,filename,mask)) { + bool isdots = (ISDOT(dname) || ISDOTDOT(dname)); char mname[13]; struct smb_filename *smb_fname = NULL; NTSTATUS status; @@ -891,6 +892,11 @@ bool get_dir_entry(TALLOC_CTX *ctx, } } + if (check_descend && !isdots) { + TALLOC_FREE(filename); + continue; + } + if (needslash) { pathreal = talloc_asprintf(ctx, "%s/%s",