Using regcomp/regexec in code - are POSIX extended regular expressions available all archs?

Matt Grant matt at mattgrant.net.nz
Fri Sep 9 07:23:31 UTC 2022


Hi!

Got an answer.

Have put a simple extended regular expression '^[0-9a-fA-F.:/]+$' in
source3/utils/testparm.c do_netaccesslist_check() in the merge request.
Found that source3/param/loadparm.c has REG_ICASE flag in call to
regcomp(), so it looks like the POSIX regex(3) is supported.

Thank you!

Matt Grant

On Fri, 9 Sept 2022 at 16:21, Matt Grant <matt at mattgrant.net.nz> wrote:

> Hi!
>
> I am looking at using these functions in source3/utils/testparm.c to check
> network/netmask and IP address for use with lib/util/access.c
> allow_access() parameters for dynamic DNS filters for the SAMBA_INTERNAL
> dns server.
>
> Are the Linux POSIX extended regular expressions available on all compile
> targets?  (*BSD, Linux, SVr4, AIX, IBM i) etc?
>
> Been around Linux since the early nineties.  Things would be easier if
> Samba supported libpcre2, the Regexps for samba-tool testparm are a slam
> dunk as they are basically Perl regular expressions.
>
> Want to know before cutting code and getting it into master.
>
> Best Regards,
>
> Matt Grant
>


More information about the samba-technical mailing list