Re: [PATCHES] [HACKERS] segfault caused by heimdal (was: SUSE port)
Reinhard Max writes: > On Wed, 12 Jan 2005 at 14:59, Tom Lane wrote: >> That looks like a reasonable fix, but isn't it needed in >> backend/libpq/auth.c as well? > Yes, indeed: > auth.c: In function `pg_krb5_init': > auth.c:202: warning: implicit declaration of function `com_err' OK, patch applied in both files. regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [PATCHES] [HACKERS] segfault caused by heimdal (was: SUSE port)
On Wed, 12 Jan 2005 at 14:59, Tom Lane wrote: > That looks like a reasonable fix, but isn't it needed in > backend/libpq/auth.c as well? Yes, indeed: auth.c: In function `pg_krb5_init': auth.c:202: warning: implicit declaration of function `com_err' cu Reinhard ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [PATCHES] [HACKERS] segfault caused by heimdal (was: SUSE port)
Reinhard Max writes: > --- src/interfaces/libpq/fe-auth.c > +++ src/interfaces/libpq/fe-auth.c > @@ -244,6 +244,11 @@ > > #include > > +#if !defined(__COM_ERR_H) && !defined(__COM_ERR_H__) > +/* if krb5.h didn't include it already */ > +#include > +#endif > + > /* > * pg_an_to_ln -- return the local name corresponding to an authentication > * name That looks like a reasonable fix, but isn't it needed in backend/libpq/auth.c as well? regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [PATCHES] [HACKERS] segfault caused by heimdal (was: SUSE port)
Sorry for following up to myself once more... On Wed, 12 Jan 2005 at 19:36, Reinhard Max wrote: > The problem is, that the heimdal implementation of kerberos5 used on > sles8 needs an extra include statement for com_err.h in > src/interfaces/libpq/fe-auth.c to get the prototype for > error_message(), while on newer SUSE-releases using the MIT > Kerberos5 implementation this prototype is provided by krb5.h > itself. after finding and reading the thread on HACKERS about com_err.h from last December, I think either should configure check if including krb5.h is sufficient for getting the prototype of error_message(), or a conditional include for krb5.h should be added to src/interfaces/libpq/fe-auth.c. A proposed patch to achieve the latter is attached to this mail. Either way will lead to a build time error when error_message() isn't declared or com_err.h can't be found, which is better than the current situation where only a warning about a missing prototype is issued, but compilation continues resulting in a broken libpq. cu Reinhard--- src/interfaces/libpq/fe-auth.c +++ src/interfaces/libpq/fe-auth.c @@ -244,6 +244,11 @@ #include +#if !defined(__COM_ERR_H) && !defined(__COM_ERR_H__) +/* if krb5.h didn't include it already */ +#include +#endif + /* * pg_an_to_ln -- return the local name corresponding to an authentication * name ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster