Unix Technical Forum

Re: [HACKERS] segfault caused by heimdal (was: SUSE port)

This is a discussion on Re: [HACKERS] segfault caused by heimdal (was: SUSE port) within the Pgsql Patches forums, part of the PostgreSQL category; --> Sorry for following up to myself once more... On Wed, 12 Jan 2005 at 19:36, Reinhard Max wrote: > ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 10:57 PM
Reinhard Max
 
Posts: n/a
Default Re: [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

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-17-2008, 10:57 PM
Tom Lane
 
Posts: n/a
Default Re: [HACKERS] segfault caused by heimdal (was: SUSE port)

Reinhard Max <max@suse.de> 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 majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-17-2008, 10:57 PM
Tom Lane
 
Posts: n/a
Default Re: [HACKERS] segfault caused by heimdal (was: SUSE port)

Reinhard Max <max@suse.de> writes:
> --- src/interfaces/libpq/fe-auth.c
> +++ src/interfaces/libpq/fe-auth.c
> @@ -244,6 +244,11 @@
>
> #include <krb5.h>
>
> +#if !defined(__COM_ERR_H) && !defined(__COM_ERR_H__)
> +/* if krb5.h didn't include it already */
> +#include <com_err.h>
> +#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 majordomo@postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:55 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com