summaryrefslogtreecommitdiff
path: root/source3/torture/test_matching.c
Commit message (Collapse)AuthorAgeFilesLines
* s3:lib: add samba_path_matching_regex_sub1_create()Stefan Metzmacher2021-07-011-0/+126
| | | | | | | | | | | | | | | This will allow the usage 'POSIX Basic Regular Expression' instead of 'ms wildcard' strings. We allow exactly one 'subexpression' starting with '\(' and ending with '\)' in order to find a replacement (byte) region in the matching string. This will be used in the vfs_preopen module in the following commits. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3:lib: add a new samba_path_matching* infrastructureStefan Metzmacher2021-07-011-4/+48
| | | | | | | | | | | | This aims to replace the current is_in_path() code in the long run. For now it implements samba_path_matching_mswild_create() in order to replace is_in_path() in the long run. But there will be other "backends" using regexec() too. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3:torture: add STR-MATCH-MSWILD test for is_in_path()Stefan Metzmacher2021-07-011-0/+106
I want to assert at least some of the behavior as the next commits will add a new abstraction that should at least partly behave the same. Note: case_[in]sensitive_idx is the index to the patterns in the namelist, set to -1 on non-match, otherwise to a value >= 0. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>