<div dir="ltr">Hi Dilyan,<div>These are the contents of my /usr/lib/sasl2.  </div><div><div>okale:/usr/local/lib/sasl2$ ls -lrth</div><div>total 904K</div><div>-rw-r--r-- 1 root root    4 May  9 18:11 berkeley_db.active</div><div>-rwxr-xr-x 1 root root  93K May 18 15:12 libcrammd5.so.3.0.0</div><div>lrwxrwxrwx 1 root root   19 May 18 15:12 libcrammd5.so.3 -> libcrammd5.so.3.0.0</div><div>lrwxrwxrwx 1 root root   19 May 18 15:12 libcrammd5.so -> libcrammd5.so.3.0.0</div><div>-rwxr-xr-x 1 root root  672 May 18 15:12 <a href="http://libcrammd5.la">libcrammd5.la</a></div><div>-rwxr-xr-x 1 root root 232K May 18 15:12 libdigestmd5.so.3.0.0</div><div>lrwxrwxrwx 1 root root   21 May 18 15:12 libdigestmd5.so.3 -> libdigestmd5.so.3.0.0</div><div>lrwxrwxrwx 1 root root   21 May 18 15:12 libdigestmd5.so -> libdigestmd5.so.3.0.0</div><div>-rwxr-xr-x 1 root root  693 May 18 15:12 <a href="http://libdigestmd5.la">libdigestmd5.la</a></div><div>-rwxr-xr-x 1 root root 160K May 18 15:12 libscram.so.3.0.0</div><div>lrwxrwxrwx 1 root root   17 May 18 15:12 libscram.so.3 -> libscram.so.3.0.0</div><div>lrwxrwxrwx 1 root root   17 May 18 15:12 libscram.so -> libscram.so.3.0.0</div><div>-rwxr-xr-x 1 root root  669 May 18 15:12 <a href="http://libscram.la">libscram.la</a></div><div>-rwxr-xr-x 1 root root 214K May 18 15:12 libotp.so.3.0.0</div><div>lrwxrwxrwx 1 root root   15 May 18 15:12 libotp.so.3 -> libotp.so.3.0.0</div><div>lrwxrwxrwx 1 root root   15 May 18 15:12 libotp.so -> libotp.so.3.0.0</div><div>-rwxr-xr-x 1 root root  657 May 18 15:12 <a href="http://libotp.la">libotp.la</a></div><div>-rwxr-xr-x 1 root root  81K May 18 15:12 libplain.so.3.0.0</div><div>lrwxrwxrwx 1 root root   17 May 18 15:12 libplain.so.3 -> libplain.so.3.0.0</div><div>lrwxrwxrwx 1 root root   17 May 18 15:12 libplain.so -> libplain.so.3.0.0</div><div>-rwxr-xr-x 1 root root  668 May 18 15:12 <a href="http://libplain.la">libplain.la</a></div><div>-rwxr-xr-x 1 root root  79K May 18 15:12 libanonymous.so.3.0.0</div><div>lrwxrwxrwx 1 root root   21 May 18 15:12 libanonymous.so.3 -> libanonymous.so.3.0.0</div><div>lrwxrwxrwx 1 root root   21 May 18 15:12 libanonymous.so -> libanonymous.so.3.0.0</div><div>-rwxr-xr-x 1 root root  684 May 18 15:12 <a href="http://libanonymous.la">libanonymous.la</a></div><div>-rwxr-xr-x 1 root root   37 May 18 15:59 memcached-sasl-pwdb</div><div>-rw-r--r-- 1 root root  105 May 18 16:02 memcached.conf</div><div>okale:/usr/local/lib/sasl2$ </div></div><div><br></div><div><br></div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Also I see pluginviewer looks in the same directory for the plugins:</span><div><br><div><div>open("/usr/lib/sasl2/libotp.so.3", O_RDONLY|O_CLOEXEC) = 4</div><div>read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\331\0\0\0\0\0\0"..., 832) = 832</div><div>fstat(4, {st_mode=S_IFREG|0755, st_size=218776, ...}) = 0</div><div>mmap(NULL, 2204424, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f33d9d44000</div><div>mprotect(0x7f33d9d59000, 2097152, PROT_NONE) = 0</div><div>mmap(0x7f33d9f59000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x15000) = 0x7f33d9f59000</div><div>close(4)                                = 0</div><div>mprotect(0x7f33d9f59000, 4096, PROT_READ) = 0</div><div>open("/usr/lib/sasl2/<a href="http://libdigestmd5.la">libdigestmd5.la</a>", O_RDONLY) = 4</div><div>close(4)                                = 0</div><div>open("/usr/lib/sasl2/<a href="http://libplain.la">libplain.la</a>", O_RDONLY) = 4</div><div>fstat(4, {st_mode=S_IFREG|0755, st_size=668, ...}) = 0</div><div>read(4, "# <a href="http://libplain.la">libplain.la</a> - a libtool librar"..., 4096) = 668</div><div>close(4)                                = 0</div><div>open("/usr/lib/sasl2/libplain.so.3", O_RDONLY|O_CLOEXEC) = 4</div></div><div><br></div></div><div class="gmail_extra">I had changed the symbolic links as mentioned in the cyrus wiki like this:</div><div class="gmail_extra"><pre style="box-sizing:border-box;font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;white-space:pre;margin:1em 0.5em 0.5em;padding:0.5em 12px 0.5em 1.5em;line-height:1.5;display:block;overflow:auto;color:rgb(64,64,64);border:0px solid;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">ln -s /usr/local/lib/sasl2 /usr/lib/sasl2</pre><div><div class="gmail_signature"><div dir="ltr"><div dir="ltr"><br></div><div>In spite of this, I see the following error in my memcached server log:</div><div><br></div><div dir="ltr">mech:  ``PLAIN'' with 26 bytes of data</div><div dir="ltr">SASL (severity 5): could not find auxprop plugin, was searching for 'sasldb'</div><div dir="ltr">SASL (severity 5): could not find auxprop plugin, was searching for 'sasldb'</div><div dir="ltr"><br></div><div>My memcached.conf looks as below:</div><div><div>pwcheck_method: auxprop</div><div>auxprop_plugin: sasldb</div><div>mech_list: plain</div><div>log_level: 5</div><div>sasldb_path: /usr/lib/sasl2</div></div><div><br></div><div>What I can't understand is how I enable the auxprop plugin with berkeley db for cyrus to read the config correctly?</div><div><br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr">Thanks and Regards,<br></div><div dir="ltr"><div>Om Kale</div><div><br><br></div></div></div></div></div><div class="gmail_quote">On Sat, May 19, 2018 at 5:47 AM, Dilyan Palauzov <span dir="ltr"><<a href="mailto:Dilyan.Palauzov@aegee.org" target="_blank">Dilyan.Palauzov@aegee.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
sasl installs the plugins in $prefix/lib/sasl2, which defaults to /usr/<br>
local/lib/sasl2, but looks for them in $plugindir, which defaults to<br>
/usr/lib/sasl2 . So "./configure && make install" does not work.<br>
<br>
To check if this is related to you, find the directory containing the<br>
plugins are installed, e.g.     /usr/local/lib/sasl2 and the<br>
directory checked by pluginviewer, e.g. by running it behind strace.<br>
<br>
It could be something completely different, however, I don't recall the<br>
details now.<br>
<br>
This patch:<br>
<br>
     - ensures a usable system after "./configure && make install", in<br>
particular<br>
       it abolishes the possibility to install plugins in one directory<br>
and load<br>
       them from another;<br>
     - installs the plugins by default in $(libdir)/sasl2;<br>
     - looks for configuration files by default in the directory, where<br>
plugins are<br>
       installed, as de jure it has always been, and in<br>
${sysconfdir}/sasl2 instead<br>
       of /etc/sasl2;<br>
     - updates ./configure --help accordingly;<br>
<br>
        $(mkinstalldirs) $(framedir)/Versions/A/<wbr>Resources<br>
diff --git a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
--- a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
+++ b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
@@ -1124,17 +1124,15 @@ AC_SUBST(SASL_STATIC_OBJS)<br>
 AC_SUBST(SASL_STATIC_LIBS)<br>
<br>
 AC_ARG_WITH(plugindir, [  --with-plugindir=DIR    set the directory<br>
where plugins will<br>
-                          be found [[/usr/lib/sasl2]] ],<br>
+                          be found [[LIBDIR/sasl2]] ],<br>
   plugindir=$withval,<br>
-  plugindir=/usr/lib/sasl2)<br>
-AC_DEFINE_UNQUOTED(PLUGINDIR, "$plugindir", [Runtime plugin location])<br>
+  plugindir='${libdir}/sasl2')<br>
 AC_SUBST(plugindir)<br>
<br>
 AC_ARG_WITH(configdir, [   --with-configdir=DIR    set the directory<br>
where config files will<br>
-                          be found [/usr/lib/sasl2] ],<br>
+                          be found [PLUGINDIR:SYSCONFDIR/sasl2] ],<br>
   configdir=$withval,<br>
-  configdir=$plugindir:/etc/<wbr>sasl2)<br>
-AC_DEFINE_UNQUOTED(CONFIGDIR, "$configdir", [Runtime config file<br>
location])<br>
+  configdir='${plugindir}:${<wbr>sysconfdir}/sasl2')<br>
 AC_SUBST(configdir)<br>
<br>
 dnl look for rc4 libraries. we accept the CMU one or one from openSSL<br>
diff --git a/lib/Makefile.am b/lib/Makefile.am<br>
--- a/lib/Makefile.am<br>
+++ b/lib/Makefile.am<br>
@@ -46,8 +46,7 @@<br>
 sasl_version = 3:0:0<br>
<br>
 AM_CPPFLAGS=-DLIBSASL_EXPORTS=<wbr>1 -I$(top_srcdir)/include<br>
-I$(top_srcdir)/plugins \<br>
-            -I$(top_builddir)/include -I$(top_srcdir)/sasldb<br>
-I$(top_srcdir)/common<br>
-<br>
+               -I$(top_builddir)/include -I$(top_srcdir)/sasldb<br>
-I$(top_srcdir)/common -DCONFIGDIR='"${configdir}"'<br>
-DPLUGINDIR='"${plugindir}"'<br>
 PLUGIN_COMMON_OBJS = $(top_builddir)/common/<a href="http://libplugin_common.la" rel="noreferrer" target="_blank">libplug<wbr>in_common.la</a><br>
<br>
 EXTRA_DIST = windlopen.c dlopen.c staticopen.h NTMakefile<br>
 EXTRA_DIST = windlopen.c dlopen.c staticopen.h NTMakefile<br>
diff --git a/plugins/Makefile.am b/plugins/Makefile.am<br>
--- a/plugins/Makefile.am<br>
+++ b/plugins/Makefile.am<br>
@@ -64,9 +64,8 @@ noinst_SCRIPTS = makeinit.sh<br>
 LIB_MYSQL = @LIB_MYSQL@<br>
<br>
 plugindir = @plugindir@<br>
+plugin_LTLIBRARIES = @SASL_MECHS@<br>
<br>
-sasldir = $(prefix)/lib/sasl2<br>
-sasl_LTLIBRARIES = @SASL_MECHS@<br>
 EXTRA_LTLIBRARIES = <a href="http://libplain.la" rel="noreferrer" target="_blank">libplain.la</a> <a href="http://libanonymous.la" rel="noreferrer" target="_blank">libanonymous.la</a> <a href="http://libkerberos4.la" rel="noreferrer" target="_blank">libkerberos4.la</a><br>
<a href="http://libcrammd5.la" rel="noreferrer" target="_blank">libcrammd5.la</a> \<br>
        <a href="http://libgs2.la" rel="noreferrer" target="_blank">libgs2.la</a> <a href="http://libgssapiv2.la" rel="noreferrer" target="_blank">libgssapiv2.la</a> <a href="http://libdigestmd5.la" rel="noreferrer" target="_blank">libdigestmd5.la</a> <a href="http://liblogin.la" rel="noreferrer" target="_blank">liblogin.la</a> <a href="http://libsrp.la" rel="noreferrer" target="_blank">libsrp.la</a><br>
<a href="http://libotp.la" rel="noreferrer" target="_blank">libotp.la</a> \<br>
        <a href="http://libscram.la" rel="noreferrer" target="_blank">libscram.la</a> <a href="http://libntlm.la" rel="noreferrer" target="_blank">libntlm.la</a> <a href="http://libpassdss.la" rel="noreferrer" target="_blank">libpassdss.la</a> <a href="http://libsasldb.la" rel="noreferrer" target="_blank">libsasldb.la</a> <a href="http://libsql.la" rel="noreferrer" target="_blank">libsql.la</a><br>
<a href="http://libldapdb.la" rel="noreferrer" target="_blank">libldapdb.la</a><br>
diff --git a/sample/Makefile.am b/sample/Makefile.am<br>
index 6b41b49..f907d2a 100644<br>
--- a/sample/Makefile.am<br>
+++ b/sample/Makefile.am<br>
@@ -42,7 +42,7 @@<br>
 #<br>
 ##############################<wbr>##############################<wbr>####<br>
<br>
-AM_CPPFLAGS=-I$(top_srcdir)/<wbr>include<br>
+AM_CPPFLAGS=-I$(top_srcdir)/<wbr>include -DPLUGINDIR='"${plugindir}"'<br>
<br>
 noinst_PROGRAMS = client server http_digest_client<br>
 EXTRA_PROGRAMS = sample-client sample-server<br>
<div class="gmail-HOEnZb"><div class="gmail-h5"><br>
On Fri, 2018-05-18 at 14:46 -0700, Om Kale wrote:<br>
> Hey Dan,<br>
> Thanks for the inputs. I have the sasldb folder (I presume sasldb<br>
> library is something different. If yes, where do I find this) inside<br>
> the cyrus-sasl installation folder. The contents of sasldb folder are<br>
> as below:<br>
> /sasldb$ ls -lrt<br>
> total 176<br>
> -rw-rw-r-- 1 cisco cisco  4750 Jan 27  2012 sasldb.h<br>
> -rw-rw-r-- 1 cisco cisco  2527 Jan 27  2012 NTMakefile<br>
> -rw-rw-r-- 1 cisco cisco  2606 Jan 27  2012 Makefile.am<br>
> -rw-rw-r-- 1 cisco cisco  3882 Jan 27  2012 db_none.c<br>
> -rw-rw-r-- 1 cisco cisco  9451 Jan 27  2012 db_ndbm.c<br>
> -rw-rw-r-- 1 cisco cisco  9366 Jan 27  2012 db_gdbm.c<br>
> -rw-rw-r-- 1 cisco cisco  7235 Jan 27  2012 allockey.c<br>
> -rw-rw-r-- 1 cisco cisco 12505 Oct 12  2012 db_berkeley.c<br>
> -rw-rw-r-- 1 cisco cisco 19194 Nov  6  2012 Makefile.in<br>
> -rw-rw-r-- 1 cisco cisco 14104 May  9 16:17 db_none.o<br>
> -rw-rw-r-- 1 cisco cisco 18533 May 18 14:12 Makefile<br>
> -rw-r--r-- 1 root  root  31336 May 18 14:12 allockey.lo<br>
> -rw-r--r-- 1 root  root  14136 May 18 14:12 db_none.lo<br>
> -rw-r--r-- 1 root  root    600 May 18 14:12 <a href="http://libsasldb.la" rel="noreferrer" target="_blank">libsasldb.la</a><br>
> <br>
> I have configured using <br>
> --with-dblib=BERKELEY as well..didn't give me any issues. Initially,<br>
> I had used '--with-dbpath=/etc/sasldb2', but later understood that<br>
> this cannot be used for MD5 auth.<br>
> <br>
> However, 'pluginviewer -a' gives none.<br>
> dd17-ubuntu-okale:/usr/local/<wbr>sbin$ pluginviewer -a<br>
> Installed and properly configured auxprop mechanisms are:<br>
> <none><br>
> <br>
> <br>
> The ldd on pluginviewer looks like this:<br>
> dd17-ubuntu-okale:/usr/local/<wbr>sbin$ ldd pluginviewer <br>
>       linux-vdso.so.1 =>  (0x00007ffcc87e3000)<br>
>       libsasl2.so.3 => /usr/local/lib/libsasl2.so.3<br>
> (0x00007f9f3a2e4000)<br>
>       libc.so.6 => /lib/x86_64-linux-gnu/libc.so.<wbr>6<br>
> (0x00007f9f39f1a000)<br>
>       libdl.so.2 => /lib/x86_64-linux-gnu/libdl.<wbr>so.2<br>
> (0x00007f9f39d16000)<br>
>       /lib64/ld-linux-x86-64.so.2 (0x00007f9f3a501000)<br>
> <br>
> <br>
> The ldd on my memcached binary looks like this:<br>
> dd17-ubuntu-okale:~/Downloads/<wbr>memcached-1.5.7$ ldd memcached<br>
>       linux-vdso.so.1 =>  (0x00007ffd6bfb8000)<br>
>       libevent-2.0.so.5 => /usr/lib/x86_64-linux-gnu/<wbr>libevent-<br>
> 2.0.so.5 (0x00007f270c40e000)<br>
>       libsasl2.so.3 => /usr/local/lib/libsasl2.so.3<br>
> (0x00007f270c1f1000)<br>
>       libpthread.so.0 => /lib/x86_64-linux-gnu/<wbr>libpthread.so.0<br>
> (0x00007f270bfd4000)<br>
>       libc.so.6 => /lib/x86_64-linux-gnu/libc.so.<wbr>6<br>
> (0x00007f270bc0a000)<br>
>       libdl.so.2 => /lib/x86_64-linux-gnu/libdl.<wbr>so.2<br>
> (0x00007f270ba06000)<br>
>       /lib64/ld-linux-x86-64.so.2 (0x00007f270c654000)<br>
> <br>
> So they are pointing to the same location.<br>
> <br>
> For installation of cyrus, I have downloaded the tar.gz, untarred it<br>
> and then configured it using ./configure, followed by make, make<br>
> install and adding the symbolic link as mentioned in the<br>
> documentation.<br>
> However, for the server side application (in my case memcached) using<br>
> cyrus-sasl, I don't see any generalized way, I only see documentation<br>
> for postfix server application.<br>
> W<br>
> <br>
> Thanks and Regards,<br>
> Om Kale<br>
> <br>
> <br>
> On Thu, May 17, 2018 at 7:08 PM, Dan White <<a href="mailto:dwhite@olp.net">dwhite@olp.net</a>> wrote:<br>
> > On 05/17/18 18:41 -0700, Om Kale wrote:<br>
> > > Hi All,<br>
> > > I am trying to integrate cyrus-sasl with memcached. I am<br>
> > > repeatedly seeing<br>
> > > the following error on the memcached application server:<br>
> > > SASL (severity 5): could not find auxprop plugin, was searching<br>
> > > for 'sasldb'<br>
> > > SASL (severity 5): could not find auxprop plugin, was searching<br>
> > > for 'sasldb'<br>
> > > <br>
> > > <br>
> > > Could someone please help me with the same.<br>
> > > <br>
> > > I have created a config file named memcached.conf inside<br>
> > > /usr/lib/sasl2/<br>
> > > that looks like follows:<br>
> > > pwcheck_method: auxprop<br>
> > > auxprop_plugin: sasldb<br>
> > > mech_list: plain<br>
> > > log_level: 5<br>
> > > sasldb_path: /usr/lib/sasl2<br>
> > > <br>
> > > I have also configured cyrus-sasl using:<br>
> > > ./configure --with-plugindir=/usr/lib/<wbr>sasl2 --with-<br>
> > > configdir=/usr/lib/sasl2<br>
> > > <br>
> >  <br>
> > Assuming that you compiled dynamically, does the sasldb shared<br>
> > library<br>
> > exist? If not, you may need to check it's build dependencies and<br>
> > you may<br>
> > need to specify --with-dblib and/or CPPFLAGS/LDFLAGS if berkerly<br>
> > cannot be<br>
> > found.<br>
> > <br>
> > Use 'pluginviewer -a' to verify that the glue library can find<br>
> > sasldb.<br>
> > strace or another system call trace tool should verify the<br>
> > directory path<br>
> > being searched.<br>
> > <br>
> > If using shared libraries, ldd on both pluginview and your<br>
> > memcached binary<br>
> > should point to the same location for libsasl2.so.2.<br>
> <br>
> <br>
</div></div></blockquote></div><br></div></div>