[squid-users] Squid regex grammar
Yuri
yvoinov at gmail.com
Fri Oct 27 13:59:30 UTC 2017
27.10.2017 12:01, Amos Jeffries пишет:
> On 27/10/17 13:06, Yuri wrote:
>> Just for clarify (it is not well-documented. At least I can't find any
>> documentation about):
>>
>> Squid's regex supports only POSIX Basic grammar?
>>
>
> The specific grammar depends on your regex library used to build
> Squid, so YMMV.
>
> Basic POSIX is the only portable grammar that *all* regex libraries
> can be expected to support. So Squid does not officially support other
> grammars (yet) even if they work in your particular build.
That's why I'm asking that the POSIX Extended in the Squid does not
work. And it is not well documented anywhere. And there is no easy way
to check what regex library Squid uses.
I'm trying to find it in configuration, found that:
root @ cthulhu /patch/squid-5.0.0-patched-v2.26 # ./configure
--help|grep regex
--enable-gnuregex Compile GNUregex. Unless you have reason to
use this
Unix boxes which do not have their own regex
library
Then see ldd:
root @ cthulhu /patch/squid-5.0.0-patched-v2.26 # ldd
/usr/local/squid/sbin/squid libpthread.so.1 =>
/lib/64/libpthread.so.1
libnettle.so.6 => /opt/csw/lib/amd64/libnettle.so.6
libmd5.so.1 => /lib/64/libmd5.so.1
libecap.so.3 => /usr/local/lib/libecap.so.3
libatomic.so.1 => /opt/csw/lib/amd64/libatomic.so.1
libssl.so.1.0.0 => /opt/csw/lib/amd64/libssl.so.1.0.0
libcrypto.so.1.0.0 => /opt/csw/lib/amd64/libcrypto.so.1.0.0
libkrb5.so.1 => /usr/lib/64/libkrb5.so.1
libstdc++.so.6 => /opt/csw/lib/amd64/libstdc++.so.6
libsocket.so.1 => /lib/64/libsocket.so.1
libresolv.so.2 => /lib/64/libresolv.so.2
libnsl.so.1 => /lib/64/libnsl.so.1
libltdl.so.7 => /opt/csw/lib/amd64/libltdl.so.7
libm.so.2 => /lib/64/libm.so.2
librt.so.1 => /lib/64/librt.so.1
libgcc_s.so.1 => /opt/csw/lib/amd64/libgcc_s.so.1
libc.so.1 => /lib/64/libc.so.1
libmp.so.2 => /lib/64/libmp.so.2
libmd.so.1 => /lib/64/libmd.so.1
libscf.so.1 => /lib/64/libscf.so.1
libaio.so.1 => /lib/64/libaio.so.1
libdoor.so.1 => /lib/64/libdoor.so.1
libuutil.so.1 => /lib/64/libuutil.so.1
libgen.so.1 => /lib/64/libgen.so.1
mech_krb5.so.1 => /usr/lib/64/gss/mech_krb5.so.1
libgss.so.1 => /usr/lib/64/libgss.so.1
libpkcs11.so.1 => /usr/lib/64/libpkcs11.so.1
libcmd.so.1 => /lib/64/libcmd.so.1
libcryptoutil.so.1 => /usr/lib/64/libcryptoutil.so.1
From this output, you can not determine the regular expression library
that is being used. Although maybe I'm just not looking there.
Experimentally, I was able to find out that the grammar of POSIX
Extended does not work in any case.
However, I believe that such things should be well documented, otherwise
the regular expression is simply silently ignored and it is extremely
difficult to detect.
>
> Amos
> _______________________________________________
> squid-users mailing list
> squid-users at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users
--
**************************
* C++: Bug to the future *
**************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x3E3743A7.asc
Type: application/pgp-keys
Size: 2887 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20171027/17b11680/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: OpenPGP digital signature
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20171027/17b11680/attachment.sig>
More information about the squid-users
mailing list