<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 22, 2020 at 10:24 PM Ahsan Hadi &lt;<a href="mailto:ahsan.hadi@gmail.com">ahsan.hadi@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Hoshiai-san,<div><br></div><div>I am getting a warning with configure..</div><div><br></div><div><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">configure: WARNING: unrecognized options: --with-ldap</span></p></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures">with this configure command..</span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">./configure --prefix=/usr/local/postgres/pgpool_41 --with-pgsql=/usr/local/postgres/pgsql/ --with-ldap</span></p></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures">I have applied the pgpoo_ldap_auth_v3.patch on pgpool II 4.1 stable branch, the patch applies cleanly. I have been having some issues with running master branch so trying with 4.1 stable branch..</span></div></div></div></div></blockquote><div><br></div><div>Thanks, I have fixed the configure issue after doing autoheard, aclocal, automake and autoconf...</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures">- Ahsan</span></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 12, 2020 at 1:31 PM Takuma Hoshiai &lt;<a href="mailto:hoshiai@sraoss.co.jp" target="_blank">hoshiai@sraoss.co.jp</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On Thu, 11 Jun 2020 15:53:21 +0900<br>
Takuma Hoshiai &lt;<a href="mailto:hoshiai@sraoss.co.jp" target="_blank">hoshiai@sraoss.co.jp</a>&gt; wrote:<br>
<br>
&gt; On Wed, 10 Jun 2020 08:37:07 +0000<br>
&gt; 周建身 &lt;<a href="mailto:zhoujianshen@highgo.com" target="_blank">zhoujianshen@highgo.com</a>&gt; wrote:<br>
&gt; <br>
&gt; &gt; Hello Takuma Hoshiai,<br>
&gt; &gt;     I did the patch of pgpool_ldap_auth_v2.patch you send  in this email.then I tried to do ldap authentication as I did with postgresql. But I got a segmentation fault.<br>
&gt; &gt; I tried to find out why this happened. I find that postgresql has Macro definition of HAVE_LDAP_INITIALIZE,but pgpool does not have.I think there may be still two problem remains.<br>
&gt; &gt; 1、do config<br>
&gt; &gt; ./configure --prefix=/opt/pgpool --with-pgsql=/opt/PG12 --with-ldap<br>
&gt; &gt; --with-ldap parameter do not enable precompilation of #ifdef HAVE_LDAP_INITIALIZE<br>
&gt; &gt; <br>
&gt; &gt; 2、there is a spelling error in program.<br>
&gt; &gt; ldap_dn2domain(frontdend-&gt;pool_hba-&gt;ldapbasedn, &amp;domain) should be <br>
&gt; &gt; ldap_dn2domain(frontend-&gt;pool_hba-&gt;ldapbasedn, &amp;domain) <br>
&gt; <br>
&gt; Thank you for testing this patch.<br>
&gt; I will add its precomplication in <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a>, and fix this typo.<br>
<br>
I update ldap&#39;s patch. On my environment, I tested that this patch work<br>
correctly. Could you test to use this patch on your environment too?<br>
<br>
&gt; &gt; after defining HAVE_LDAP_INITIALIZE manually in program and correct spelling error,then I can connect to pgpool through ldap authentication.<br>
&gt; <br>
&gt; That&#39;s great!<br>
&gt; <br>
&gt; &gt; can you review this problem?<br>
&gt; <br>
&gt; Sure.<br>
&gt; I will check it.<br>
&gt; <br>
&gt; <br>
&gt; Best Regards,<br>
&gt; Takuma Hoshiai<br>
&gt; <br>
&gt; &gt; Thanks<br>
&gt; &gt; Best regards<br>
&gt; &gt; Zhoujianshen<br>
&gt; &gt; <a href="mailto:zhoujianshen@highgo.com" target="_blank">zhoujianshen@highgo.com</a><br>
&gt; &gt; ________________________________________<br>
&gt; &gt; 发件人: Takuma Hoshiai &lt;<a href="mailto:hoshiai@sraoss.co.jp" target="_blank">hoshiai@sraoss.co.jp</a>&gt;<br>
&gt; &gt; 发送时间: 2020年4月21日 16:31<br>
&gt; &gt; 收件人: 周建身<br>
&gt; &gt; 抄送: pgpool-hackers; Muhammad; 吕昊凌<br>
&gt; &gt; 主题: Re: error of LDAP authentication from [pgpool-hackers:3538]<br>
&gt; &gt; <br>
&gt; &gt; Hello<br>
&gt; &gt; <br>
&gt; &gt; Thank you for letting me know.<br>
&gt; &gt; After checking, I find out this problem. It happend when --with-ldap and<br>
&gt; &gt; --with-pam options were not used together.<br>
&gt; &gt; <br>
&gt; &gt; I have attached fixed patch for this problem.<br>
&gt; &gt; Please try again with this patch.<br>
&gt; &gt; <br>
&gt; &gt; Best Regards,<br>
&gt; &gt; Takuma Hoshiai<br>
&gt; &gt; <br>
&gt; &gt; On Tue, 21 Apr 2020 02:17:39 +0000<br>
&gt; &gt; 周建身 &lt;<a href="mailto:zhoujianshen@highgo.com" target="_blank">zhoujianshen@highgo.com</a>&gt; wrote:<br>
&gt; &gt; <br>
&gt; &gt; &gt; Hello<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;     Under the directory of pgpool,I did the patch of LDAP authentication from [pgpool-hackers:3538].<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; The patched command which I used is,patch -p1 &lt; pgpool_ldap_auth.patch.I got pgpool_ldap_auth.patch from [pgpool-hackers:3538].<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; The patched results are as follows<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; (Stripping trailing CRs from patch; use --binary to disable.)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; patching file <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; (Stripping trailing CRs from patch; use --binary to disable.)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; patching file doc.ja/src/sgml/client-auth.sgml<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; (Stripping trailing CRs from patch; use --binary to disable.)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; patching file doc/src/sgml/client-auth.sgml<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; (Stripping trailing CRs from patch; use --binary to disable.)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; patching file src/auth/pool_auth.c<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; (Stripping trailing ?CRs from patch; use --binary to disable.)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; patching file src/auth/pool_hba.c<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; (Stripping trailing CRs from patch; use --binary to disable.)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; patching file src/include/auth/pool_hba.h<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; (Stripping trailing CRs from patch; use --binary to disable.)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; patching file src/include/<a href="http://config.h.in" rel="noreferrer" target="_blank">config.h.in</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; (Stripping trailing CRs from patch; use --binary to disable.)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; patching file src/pgpool.spec<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; patch unexpectedly ends in middle of line<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Hunk #1 succeeded at 103 with fuzz 1.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I follow the guidelines to do next operation.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;  $ autoheader<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;  $ aclocal<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;  $ automake -a -c<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;  $ autoconf<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Then,I did the configure.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; ./configure --prefix=/opt/pgpool_3 --with-pgsql=/opt/PG12<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Then I did the make operation which result in errors.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; auth/pool_hba.c:758:33: error: &#39;uaLDAP&#39; undeclared (first use in this function); did you mean &#39;uaMD5&#39;?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;   if (parsedline-&gt;auth_method == uaLDAP)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;                                  ^~~~~~<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;                                  uaMD5<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; auth/pool_hba.c:758:33: note: each undeclared identifier is reported only once for each function it appears in<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; auth/pool_hba.c: In function &#39;parse_hba_auth_opt&#39;:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; auth/pool_hba.c:895:23: error: &#39;uaLDAP&#39; undeclared (first use in this function); did you mean &#39;uaMD5&#39;?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;    REQUIRE_AUTH_OPTION(uaLDAP, &quot;ldapurl&quot;, &quot;ldap&quot;);<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;                        ^<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; auth/pool_hba.c:320:30: note: in definition of macro &#39;REQUIRE_AUTH_OPTION&#39;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;   if (hbaline-&gt;auth_method != methodval) \<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;                               ^~~~~~~~~<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Makefile:800: recipe for target &#39;auth/pool_hba.o&#39; failed<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I also did another configure.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;  ./configure --prefix=/opt/pgpool_3 --with-pgsql=/opt/PG12 --with-ldap<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Then I did the make operation which result in other errors.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; auth/pool_hba.o: In function `CheckLDAPAuth&#39;:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; /auth/pool_hba.c:2623: undefined reference to `recv_password_packet&#39;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; collect2: error: ld returned 1 exit status<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Makefile:777: recipe for target &#39;pgpool&#39; failed<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; make[2]: *** [pgpool] Error 1<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; make[2]: Leaving directory &#39;/home/zhoujianshen/pgpool-II-4.1.1/src&#39;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Makefile:866: recipe for target &#39;all-recursive&#39; failed<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; make[1]: *** [all-recursive] Error 1<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; make[1]: Leaving directory &#39;/home/zhoujianshen/pgpool-II-4.1.1/src&#39;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Makefile:410: recipe for target &#39;all-recursive&#39; failed<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; make: *** [all-recursive] Error 1<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Could you please help me checkout what result these errors,thanks.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Thanks<br>
&gt; &gt; &gt; Best regards<br>
&gt; &gt; &gt; Jianshen Zhou<br>
&gt; &gt; &gt;<br>
&gt; &gt; <br>
&gt; &gt; <br>
&gt; &gt; --<br>
&gt; &gt; Takuma Hoshiai &lt;<a href="mailto:hoshiai@sraoss.co.jp" target="_blank">hoshiai@sraoss.co.jp</a>&gt;<br>
&gt; <br>
&gt; <br>
&gt; -- <br>
&gt; Takuma Hoshiai &lt;<a href="mailto:hoshiai@sraoss.co.jp" target="_blank">hoshiai@sraoss.co.jp</a>&gt;<br>
&gt; <br>
&gt; _______________________________________________<br>
&gt; pgpool-hackers mailing list<br>
&gt; <a href="mailto:pgpool-hackers@pgpool.net" target="_blank">pgpool-hackers@pgpool.net</a><br>
&gt; <a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-hackers</a><br>
<br>
<br>
-- <br>
Takuma Hoshiai &lt;<a href="mailto:hoshiai@sraoss.co.jp" target="_blank">hoshiai@sraoss.co.jp</a>&gt;<br>
_______________________________________________<br>
pgpool-hackers mailing list<br>
<a href="mailto:pgpool-hackers@pgpool.net" target="_blank">pgpool-hackers@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-hackers</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><span style="color:rgb(0,0,0);font-family:Lato;font-size:14px">Highgo Software (Canada/China/Pakistan)</span><br style="color:rgb(0,0,0);font-family:Lato;font-size:14px"><span style="color:rgb(0,0,0);font-family:Lato;font-size:14px">URL : </span><a href="http://www.highgo.ca/" style="color:rgb(89,143,222);font-family:Lato;font-size:14px" target="_blank">http://www.highgo.ca</a><br style="color:rgb(0,0,0);font-family:Lato;font-size:14px"><span style="color:rgb(0,0,0);font-family:Lato;font-size:14px">ADDR: 10318 WHALLEY BLVD, Surrey, BC</span><br style="color:rgb(0,0,0);font-family:Lato;font-size:14px"><span style="color:rgb(0,0,0);font-family:Lato;font-size:14px">EMAIL: mailto: </span><a style="color:rgb(89,143,222);font-family:Lato;font-size:14px">ahsan.hadi@highgo.ca</a><br></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><span style="color:rgb(0,0,0);font-family:Lato;font-size:14px">Highgo Software (Canada/China/Pakistan)</span><br style="color:rgb(0,0,0);font-family:Lato;font-size:14px"><span style="color:rgb(0,0,0);font-family:Lato;font-size:14px">URL : </span><a href="http://www.highgo.ca/" style="color:rgb(89,143,222);font-family:Lato;font-size:14px" target="_blank">http://www.highgo.ca</a><br style="color:rgb(0,0,0);font-family:Lato;font-size:14px"><span style="color:rgb(0,0,0);font-family:Lato;font-size:14px">ADDR: 10318 WHALLEY BLVD, Surrey, BC</span><br style="color:rgb(0,0,0);font-family:Lato;font-size:14px"><span style="color:rgb(0,0,0);font-family:Lato;font-size:14px">EMAIL: mailto: </span><a style="color:rgb(89,143,222);font-family:Lato;font-size:14px">ahsan.hadi@highgo.ca</a><br></div></div></div>