<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 <<a href="mailto:ahsan.hadi@gmail.com">ahsan.hadi@gmail.com</a>> 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 <<a href="mailto:hoshiai@sraoss.co.jp" target="_blank">hoshiai@sraoss.co.jp</a>> 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 <<a href="mailto:hoshiai@sraoss.co.jp" target="_blank">hoshiai@sraoss.co.jp</a>> wrote:<br>
<br>
> On Wed, 10 Jun 2020 08:37:07 +0000<br>
> 周建身 <<a href="mailto:zhoujianshen@highgo.com" target="_blank">zhoujianshen@highgo.com</a>> wrote:<br>
> <br>
> > Hello Takuma Hoshiai,<br>
> > 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>
> > 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>
> > 1、do config<br>
> > ./configure --prefix=/opt/pgpool --with-pgsql=/opt/PG12 --with-ldap<br>
> > --with-ldap parameter do not enable precompilation of #ifdef HAVE_LDAP_INITIALIZE<br>
> > <br>
> > 2、there is a spelling error in program.<br>
> > ldap_dn2domain(frontdend->pool_hba->ldapbasedn, &domain) should be <br>
> > ldap_dn2domain(frontend->pool_hba->ldapbasedn, &domain) <br>
> <br>
> Thank you for testing this patch.<br>
> 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'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>
> > after defining HAVE_LDAP_INITIALIZE manually in program and correct spelling error,then I can connect to pgpool through ldap authentication.<br>
> <br>
> That's great!<br>
> <br>
> > can you review this problem?<br>
> <br>
> Sure.<br>
> I will check it.<br>
> <br>
> <br>
> Best Regards,<br>
> Takuma Hoshiai<br>
> <br>
> > Thanks<br>
> > Best regards<br>
> > Zhoujianshen<br>
> > <a href="mailto:zhoujianshen@highgo.com" target="_blank">zhoujianshen@highgo.com</a><br>
> > ________________________________________<br>
> > 发件人: Takuma Hoshiai <<a href="mailto:hoshiai@sraoss.co.jp" target="_blank">hoshiai@sraoss.co.jp</a>><br>
> > 发送时间: 2020年4月21日 16:31<br>
> > 收件人: 周建身<br>
> > 抄送: pgpool-hackers; Muhammad; 吕昊凌<br>
> > 主题: Re: error of LDAP authentication from [pgpool-hackers:3538]<br>
> > <br>
> > Hello<br>
> > <br>
> > Thank you for letting me know.<br>
> > After checking, I find out this problem. It happend when --with-ldap and<br>
> > --with-pam options were not used together.<br>
> > <br>
> > I have attached fixed patch for this problem.<br>
> > Please try again with this patch.<br>
> > <br>
> > Best Regards,<br>
> > Takuma Hoshiai<br>
> > <br>
> > On Tue, 21 Apr 2020 02:17:39 +0000<br>
> > 周建身 <<a href="mailto:zhoujianshen@highgo.com" target="_blank">zhoujianshen@highgo.com</a>> wrote:<br>
> > <br>
> > > Hello<br>
> > ><br>
> > ><br>
> > > Under the directory of pgpool,I did the patch of LDAP authentication from [pgpool-hackers:3538].<br>
> > ><br>
> > > The patched command which I used is,patch -p1 < pgpool_ldap_auth.patch.I got pgpool_ldap_auth.patch from [pgpool-hackers:3538].<br>
> > ><br>
> > ><br>
> > ><br>
> > > The patched results are as follows<br>
> > ><br>
> > ><br>
> > ><br>
> > > (Stripping trailing CRs from patch; use --binary to disable.)<br>
> > ><br>
> > > patching file <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
> > ><br>
> > > (Stripping trailing CRs from patch; use --binary to disable.)<br>
> > ><br>
> > > patching file doc.ja/src/sgml/client-auth.sgml<br>
> > ><br>
> > > (Stripping trailing CRs from patch; use --binary to disable.)<br>
> > ><br>
> > > patching file doc/src/sgml/client-auth.sgml<br>
> > ><br>
> > > (Stripping trailing CRs from patch; use --binary to disable.)<br>
> > ><br>
> > > patching file src/auth/pool_auth.c<br>
> > ><br>
> > > (Stripping trailing ?CRs from patch; use --binary to disable.)<br>
> > ><br>
> > > patching file src/auth/pool_hba.c<br>
> > ><br>
> > > (Stripping trailing CRs from patch; use --binary to disable.)<br>
> > ><br>
> > > patching file src/include/auth/pool_hba.h<br>
> > ><br>
> > > (Stripping trailing CRs from patch; use --binary to disable.)<br>
> > ><br>
> > > patching file src/include/<a href="http://config.h.in" rel="noreferrer" target="_blank">config.h.in</a><br>
> > ><br>
> > > (Stripping trailing CRs from patch; use --binary to disable.)<br>
> > ><br>
> > > patching file src/pgpool.spec<br>
> > ><br>
> > > patch unexpectedly ends in middle of line<br>
> > ><br>
> > > Hunk #1 succeeded at 103 with fuzz 1.<br>
> > ><br>
> > ><br>
> > ><br>
> > > I follow the guidelines to do next operation.<br>
> > ><br>
> > ><br>
> > ><br>
> > > $ autoheader<br>
> > ><br>
> > > $ aclocal<br>
> > ><br>
> > > $ automake -a -c<br>
> > ><br>
> > > $ autoconf<br>
> > ><br>
> > ><br>
> > ><br>
> > > Then,I did the configure.<br>
> > ><br>
> > ><br>
> > ><br>
> > > ./configure --prefix=/opt/pgpool_3 --with-pgsql=/opt/PG12<br>
> > ><br>
> > ><br>
> > ><br>
> > > Then I did the make operation which result in errors.<br>
> > ><br>
> > ><br>
> > ><br>
> > > auth/pool_hba.c:758:33: error: 'uaLDAP' undeclared (first use in this function); did you mean 'uaMD5'?<br>
> > ><br>
> > > if (parsedline->auth_method == uaLDAP)<br>
> > ><br>
> > > ^~~~~~<br>
> > ><br>
> > > uaMD5<br>
> > ><br>
> > > auth/pool_hba.c:758:33: note: each undeclared identifier is reported only once for each function it appears in<br>
> > ><br>
> > > auth/pool_hba.c: In function 'parse_hba_auth_opt':<br>
> > ><br>
> > > auth/pool_hba.c:895:23: error: 'uaLDAP' undeclared (first use in this function); did you mean 'uaMD5'?<br>
> > ><br>
> > > REQUIRE_AUTH_OPTION(uaLDAP, "ldapurl", "ldap");<br>
> > ><br>
> > > ^<br>
> > ><br>
> > > auth/pool_hba.c:320:30: note: in definition of macro 'REQUIRE_AUTH_OPTION'<br>
> > ><br>
> > > if (hbaline->auth_method != methodval) \<br>
> > ><br>
> > > ^~~~~~~~~<br>
> > ><br>
> > > Makefile:800: recipe for target 'auth/pool_hba.o' failed<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > I also did another configure.<br>
> > ><br>
> > > ./configure --prefix=/opt/pgpool_3 --with-pgsql=/opt/PG12 --with-ldap<br>
> > ><br>
> > ><br>
> > ><br>
> > > Then I did the make operation which result in other errors.<br>
> > ><br>
> > ><br>
> > ><br>
> > > auth/pool_hba.o: In function `CheckLDAPAuth':<br>
> > ><br>
> > > /auth/pool_hba.c:2623: undefined reference to `recv_password_packet'<br>
> > ><br>
> > > collect2: error: ld returned 1 exit status<br>
> > ><br>
> > > Makefile:777: recipe for target 'pgpool' failed<br>
> > ><br>
> > > make[2]: *** [pgpool] Error 1<br>
> > ><br>
> > > make[2]: Leaving directory '/home/zhoujianshen/pgpool-II-4.1.1/src'<br>
> > ><br>
> > > Makefile:866: recipe for target 'all-recursive' failed<br>
> > ><br>
> > > make[1]: *** [all-recursive] Error 1<br>
> > ><br>
> > > make[1]: Leaving directory '/home/zhoujianshen/pgpool-II-4.1.1/src'<br>
> > ><br>
> > > Makefile:410: recipe for target 'all-recursive' failed<br>
> > ><br>
> > > make: *** [all-recursive] Error 1<br>
> > ><br>
> > ><br>
> > ><br>
> > > Could you please help me checkout what result these errors,thanks.<br>
> > ><br>
> > ><br>
> > ><br>
> > > Thanks<br>
> > > Best regards<br>
> > > Jianshen Zhou<br>
> > ><br>
> > <br>
> > <br>
> > --<br>
> > Takuma Hoshiai <<a href="mailto:hoshiai@sraoss.co.jp" target="_blank">hoshiai@sraoss.co.jp</a>><br>
> <br>
> <br>
> -- <br>
> Takuma Hoshiai <<a href="mailto:hoshiai@sraoss.co.jp" target="_blank">hoshiai@sraoss.co.jp</a>><br>
> <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>
<br>
<br>
-- <br>
Takuma Hoshiai <<a href="mailto:hoshiai@sraoss.co.jp" target="_blank">hoshiai@sraoss.co.jp</a>><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>