git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b50e50
)
s3:smbd: don't ignore check_descend in get_dir_entry()
author
Stefan Metzmacher
<metze@samba.org>
Thu, 6 Aug 2009 19:16:38 +0000
(21:16 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Fri, 7 Aug 2009 09:10:52 +0000
(11:10 +0200)
metze
source3/smbd/dir.c
patch
|
blob
|
history
diff --git
a/source3/smbd/dir.c
b/source3/smbd/dir.c
index 642fb09362c0c86428e64d3132a404e38acbca01..7acd349b72190545be24f026dd07d86639b8fafa 100644
(file)
--- 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",