[pgpool-hackers: 3671] Re: 答复: error of LDAP authentication from [pgpool-hackers:3538]

Takuma Hoshiai hoshiai at sraoss.co.jp
Tue Jun 23 16:22:25 JST 2020


Hi Ahsan,

On Tue, 23 Jun 2020 12:15:47 +0500
Ahsan Hadi <ahsan.hadi at gmail.com> wrote:

> On Mon, Jun 22, 2020 at 10:24 PM Ahsan Hadi <ahsan.hadi at gmail.com> wrote:
> 
> > Hi Hoshiai-san,
> >
> > I am getting a warning with configure..
> >
> > configure: WARNING: unrecognized options: --with-ldap
> >
> > with this configure command..
> >
> > ./configure --prefix=/usr/local/postgres/pgpool_41
> > --with-pgsql=/usr/local/postgres/pgsql/ --with-ldap
> >
> > 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..
> >
> 
> Thanks, I have fixed the configure issue after doing autoheard, aclocal,
> automake and autoconf...

Thank you for your test. If you have any problem, please let me know.

Best Regards,

Takuma Hoshiai


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


-- 
Takuma Hoshiai <hoshiai at sraoss.co.jp>



More information about the pgpool-hackers mailing list