Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug #80344: LDAP SASL authentication for mysqlnd #6447

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ext/mysqlnd/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,17 @@ if (PHP_MYSQLND != "no") {
{
AC_DEFINE("MYSQLND_COMPRESSION_ENABLED", 1, "Compression support");
AC_DEFINE("MYSQLND_SSL_SUPPORTED", 1, "SSL support");
AC_DEFINE("MYSQLND_SASL_SUPPORTED", 0, "SASL support");
AC_DEFINE("MYSQLND_LDAP_KRB_SUPPORTED", 0, "LDAP Kerberos support");
if (CHECK_LIB("crypt32.lib", "mysqlnd")) {
AC_DEFINE("MYSQLND_HAVE_SSL", 1, "Extended SSL support");
}
if (CHECK_LIB("libsasl2.lib", "mysqlnd")) {
AC_DEFINE("MYSQLND_HAVE_SASL", 1, "SASL LDAP support");
}
if (CHECK_LIB("libkrb5.lib", "mysqlnd")) {
AC_DEFINE("MYSQLND_HAVE_KRB5", 1, "LDAP Kerberos support");
}
}
PHP_INSTALL_HEADERS("", "ext/mysqlnd");
}
Expand Down
30 changes: 30 additions & 0 deletions ext/mysqlnd/config9.m4
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@ PHP_ARG_ENABLE([mysqlnd_compression_support],
[yes],
[no])

PHP_ARG_ENABLE([mysqlnd_sasl_support],
[whether to enable sasl support in mysqlnd],
[AS_HELP_STRING([--enable-mysqlnd-sasl-support],
[Enable support for the sasl protocol in mysqlnd])],
[no],
[yes])


PHP_ARG_ENABLE([mysqlnd_ldap_krb_support],
[whether to enable ldap kerberos support in mysqlnd],
[AS_HELP_STRING([--enable-mysqlnd-ldap-krb-support],
[Enable support for the ldap kerberos protocol in mysqlnd])],
[no],
[yes])

dnl If some extension uses mysqlnd it will get compiled in PHP core
if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then
mysqlnd_ps_sources="mysqlnd_ps.c mysqlnd_ps_codec.c"
Expand All @@ -30,7 +45,22 @@ if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then
AC_DEFINE([MYSQLND_COMPRESSION_ENABLED], 1, [Enable compressed protocol support])
fi

if test "$PHP_MYSQLND_SASL_SUPPORT" != "no"; then
PKG_CHECK_MODULES([SASL], [libsasl2])
PHP_EVAL_LIBLINE($SASL_LIBS, MYSQLND_SHARED_LIBADD)
PHP_EVAL_INCLINE($SASL_CFLAGS)
AC_DEFINE([MYSQLND_HAVE_SASL], 1, [SASL protocol support])
fi

if test "$PHP_MYSQLND_LDAP_KRB_SUPPORT" != "no"; then
PKG_CHECK_MODULES([KRB5], [libkrb5])
PHP_EVAL_LIBLINE($KRB5_LIBS, MYSQLND_SHARED_LIBADD)
PHP_EVAL_INCLINE($KRB5_CFLAGS)
AC_DEFINE([MYSQLND_HAVE_KRB5], 1, [LDAP Kerberos protocol support])
fi

AC_DEFINE([MYSQLND_SSL_SUPPORTED], 1, [Enable core mysqlnd SSL code])
AC_DEFINE([MYSQLND_SASL_SUPPORTED], 1, [Enable sasl code])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/sasl/SASL/


test -z "$PHP_OPENSSL" && PHP_OPENSSL=no

Expand Down
Loading