1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00

s3:lib: Do not try to match '.' and '..' directories in is_in_path()

This fixes setting veto files to '.*' to not list hidden files and
directories starting with a dot.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15360

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 9eb4430662)

Autobuild-User(v4-17-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-17-test): Fri Apr 28 15:57:35 UTC 2023 on sn-devel-184
This commit is contained in:
Andreas Schneider 2023-04-19 16:23:10 +02:00 committed by Jule Anger
parent c13b5b7dc8
commit b026bbe24c
2 changed files with 5 additions and 1 deletions

View File

@ -1 +0,0 @@
^samba3.blackbox.test_veto_files.list.files.fileserver

View File

@ -748,6 +748,11 @@ bool is_in_path(const char *name, name_compare_entry *namelist, bool case_sensit
return False;
}
/* Do not reject path components if namelist is set to '.*' */
if (ISDOT(name) || ISDOTDOT(name)) {
return false;
}
DEBUG(8, ("is_in_path: %s\n", name));
/* Get the last component of the unix name. */