Hello, sasl installs the plugins in $prefix/lib/sasl2, which defaults to /usr/ local/lib/sasl2, but looks for them in $plugindir, which defaults to /usr/lib/sasl2 . So "./configure && make install" does not work.
To check if this is related to you, find the directory containing the plugins are installed, e.g. /usr/local/lib/sasl2 and the directory checked by pluginviewer, e.g. by running it behind strace. It could be something completely different, however, I don't recall the details now. This patch: - ensures a usable system after "./configure && make install", in particular it abolishes the possibility to install plugins in one directory and load them from another; - installs the plugins by default in $(libdir)/sasl2; - looks for configuration files by default in the directory, where plugins are installed, as de jure it has always been, and in ${sysconfdir}/sasl2 instead of /etc/sasl2; - updates ./configure --help accordingly; $(mkinstalldirs) $(framedir)/Versions/A/Resources diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -1124,17 +1124,15 @@ AC_SUBST(SASL_STATIC_OBJS) AC_SUBST(SASL_STATIC_LIBS) AC_ARG_WITH(plugindir, [ --with-plugindir=DIR set the directory where plugins will - be found [[/usr/lib/sasl2]] ], + be found [[LIBDIR/sasl2]] ], plugindir=$withval, - plugindir=/usr/lib/sasl2) -AC_DEFINE_UNQUOTED(PLUGINDIR, "$plugindir", [Runtime plugin location]) + plugindir='${libdir}/sasl2') AC_SUBST(plugindir) AC_ARG_WITH(configdir, [ --with-configdir=DIR set the directory where config files will - be found [/usr/lib/sasl2] ], + be found [PLUGINDIR:SYSCONFDIR/sasl2] ], configdir=$withval, - configdir=$plugindir:/etc/sasl2) -AC_DEFINE_UNQUOTED(CONFIGDIR, "$configdir", [Runtime config file location]) + configdir='${plugindir}:${sysconfdir}/sasl2') AC_SUBST(configdir) dnl look for rc4 libraries. we accept the CMU one or one from openSSL diff --git a/lib/Makefile.am b/lib/Makefile.am --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -46,8 +46,7 @@ sasl_version = 3:0:0 AM_CPPFLAGS=-DLIBSASL_EXPORTS=1 -I$(top_srcdir)/include -I$(top_srcdir)/plugins \ - -I$(top_builddir)/include -I$(top_srcdir)/sasldb -I$(top_srcdir)/common - + -I$(top_builddir)/include -I$(top_srcdir)/sasldb -I$(top_srcdir)/common -DCONFIGDIR='"${configdir}"' -DPLUGINDIR='"${plugindir}"' PLUGIN_COMMON_OBJS = $(top_builddir)/common/libplugin_common.la EXTRA_DIST = windlopen.c dlopen.c staticopen.h NTMakefile EXTRA_DIST = windlopen.c dlopen.c staticopen.h NTMakefile diff --git a/plugins/Makefile.am b/plugins/Makefile.am --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -64,9 +64,8 @@ noinst_SCRIPTS = makeinit.sh LIB_MYSQL = @LIB_MYSQL@ plugindir = @plugindir@ +plugin_LTLIBRARIES = @SASL_MECHS@ -sasldir = $(prefix)/lib/sasl2 -sasl_LTLIBRARIES = @SASL_MECHS@ EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \ libgs2.la libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la libotp.la \ libscram.la libntlm.la libpassdss.la libsasldb.la libsql.la libldapdb.la diff --git a/sample/Makefile.am b/sample/Makefile.am index 6b41b49..f907d2a 100644 --- a/sample/Makefile.am +++ b/sample/Makefile.am @@ -42,7 +42,7 @@ # ################################################################ -AM_CPPFLAGS=-I$(top_srcdir)/include +AM_CPPFLAGS=-I$(top_srcdir)/include -DPLUGINDIR='"${plugindir}"' noinst_PROGRAMS = client server http_digest_client EXTRA_PROGRAMS = sample-client sample-server On Fri, 2018-05-18 at 14:46 -0700, Om Kale wrote: > Hey Dan, > Thanks for the inputs. I have the sasldb folder (I presume sasldb > library is something different. If yes, where do I find this) inside > the cyrus-sasl installation folder. The contents of sasldb folder are > as below: > /sasldb$ ls -lrt > total 176 > -rw-rw-r-- 1 cisco cisco 4750 Jan 27 2012 sasldb.h > -rw-rw-r-- 1 cisco cisco 2527 Jan 27 2012 NTMakefile > -rw-rw-r-- 1 cisco cisco 2606 Jan 27 2012 Makefile.am > -rw-rw-r-- 1 cisco cisco 3882 Jan 27 2012 db_none.c > -rw-rw-r-- 1 cisco cisco 9451 Jan 27 2012 db_ndbm.c > -rw-rw-r-- 1 cisco cisco 9366 Jan 27 2012 db_gdbm.c > -rw-rw-r-- 1 cisco cisco 7235 Jan 27 2012 allockey.c > -rw-rw-r-- 1 cisco cisco 12505 Oct 12 2012 db_berkeley.c > -rw-rw-r-- 1 cisco cisco 19194 Nov 6 2012 Makefile.in > -rw-rw-r-- 1 cisco cisco 14104 May 9 16:17 db_none.o > -rw-rw-r-- 1 cisco cisco 18533 May 18 14:12 Makefile > -rw-r--r-- 1 root root 31336 May 18 14:12 allockey.lo > -rw-r--r-- 1 root root 14136 May 18 14:12 db_none.lo > -rw-r--r-- 1 root root 600 May 18 14:12 libsasldb.la > > I have configured using > --with-dblib=BERKELEY as well..didn't give me any issues. Initially, > I had used '--with-dbpath=/etc/sasldb2', but later understood that > this cannot be used for MD5 auth. > > However, 'pluginviewer -a' gives none. > dd17-ubuntu-okale:/usr/local/sbin$ pluginviewer -a > Installed and properly configured auxprop mechanisms are: > <none> > > > The ldd on pluginviewer looks like this: > dd17-ubuntu-okale:/usr/local/sbin$ ldd pluginviewer > linux-vdso.so.1 => (0x00007ffcc87e3000) > libsasl2.so.3 => /usr/local/lib/libsasl2.so.3 > (0x00007f9f3a2e4000) > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 > (0x00007f9f39f1a000) > libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 > (0x00007f9f39d16000) > /lib64/ld-linux-x86-64.so.2 (0x00007f9f3a501000) > > > The ldd on my memcached binary looks like this: > dd17-ubuntu-okale:~/Downloads/memcached-1.5.7$ ldd memcached > linux-vdso.so.1 => (0x00007ffd6bfb8000) > libevent-2.0.so.5 => /usr/lib/x86_64-linux-gnu/libevent- > 2.0.so.5 (0x00007f270c40e000) > libsasl2.so.3 => /usr/local/lib/libsasl2.so.3 > (0x00007f270c1f1000) > libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 > (0x00007f270bfd4000) > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 > (0x00007f270bc0a000) > libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 > (0x00007f270ba06000) > /lib64/ld-linux-x86-64.so.2 (0x00007f270c654000) > > So they are pointing to the same location. > > For installation of cyrus, I have downloaded the tar.gz, untarred it > and then configured it using ./configure, followed by make, make > install and adding the symbolic link as mentioned in the > documentation. > However, for the server side application (in my case memcached) using > cyrus-sasl, I don't see any generalized way, I only see documentation > for postfix server application. > W > > Thanks and Regards, > Om Kale > > > On Thu, May 17, 2018 at 7:08 PM, Dan White <dwh...@olp.net> wrote: > > On 05/17/18 18:41 -0700, Om Kale wrote: > > > Hi All, > > > I am trying to integrate cyrus-sasl with memcached. I am > > > repeatedly seeing > > > the following error on the memcached application server: > > > SASL (severity 5): could not find auxprop plugin, was searching > > > for 'sasldb' > > > SASL (severity 5): could not find auxprop plugin, was searching > > > for 'sasldb' > > > > > > > > > Could someone please help me with the same. > > > > > > I have created a config file named memcached.conf inside > > > /usr/lib/sasl2/ > > > that looks like follows: > > > pwcheck_method: auxprop > > > auxprop_plugin: sasldb > > > mech_list: plain > > > log_level: 5 > > > sasldb_path: /usr/lib/sasl2 > > > > > > I have also configured cyrus-sasl using: > > > ./configure --with-plugindir=/usr/lib/sasl2 --with- > > > configdir=/usr/lib/sasl2 > > > > > > > Assuming that you compiled dynamically, does the sasldb shared > > library > > exist? If not, you may need to check it's build dependencies and > > you may > > need to specify --with-dblib and/or CPPFLAGS/LDFLAGS if berkerly > > cannot be > > found. > > > > Use 'pluginviewer -a' to verify that the glue library can find > > sasldb. > > strace or another system call trace tool should verify the > > directory path > > being searched. > > > > If using shared libraries, ldd on both pluginview and your > > memcached binary > > should point to the same location for libsasl2.so.2. > >