diff options
author | Dmitrijs Goloscapovs <dmitrijs.goloscapovs@zabbix.com> | 2022-02-16 10:33:53 +0300 |
---|---|---|
committer | Dmitrijs Goloscapovs <dmitrijs.goloscapovs@zabbix.com> | 2022-02-17 17:02:13 +0300 |
commit | 6fdb83e4a1d331a8545f0758fd11c0a7660c1f4b (patch) | |
tree | ec9a749a55adf684bfc3ce1848b3687add878d51 /m4 | |
parent | da34f02b4fc8710106e5f1c9395e1ccfbaccbd8b (diff) |
........S. [ZBX-19789] added SourceIP support to ldap simple checks
Merge in ZBX/zabbix from feature/ZBX-19789-5.0 to release/5.0
* commit 'fee486b0b07412cbaf5cb3bbec14d7ea94afa0ac':
........S. [ZBX-19789] fixed usage of sourceip with bugged lib versions
........S. [ZBX-19789] added SourceIP support to ldap simple checks
(cherry picked from commit e36333e41c1a79f6cd0d336bc981e5c0f123bd0c)
Diffstat (limited to 'm4')
-rw-r--r-- | m4/ldap.m4 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/m4/ldap.m4 b/m4/ldap.m4 index ebf9211dcbc..a5e10c37f96 100644 --- a/m4/ldap.m4 +++ b/m4/ldap.m4 @@ -111,6 +111,12 @@ AC_HELP_STRING([--with-ldap@<:@=DIR@:>@],[Include LDAP support @<:@default=no@:> AC_MSG_RESULT(yes) LDAP_CPPFLAGS="-I$LDAP_INCDIR" LDAP_LDFLAGS="-L$LDAP_LIBDIR" + + ldap_ver=$(strings `find $LDAP_LIBDIR -name libldap.so` | grep OpenLDAP | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+' | tr -d '.') + if test -n "$ldap_ver" && test "$ldap_ver" -ge 261; then + AC_DEFINE(HAVE_LDAP_SOURCEIP, 1, [Define to 1 if SourceIP is supported.]) + fi + LDAP_LIBS="-lldap -llber $LDAP_LIBS" if test "x$enable_static" = "xyes"; then |