Unix Technical Forum

Kerberos code overwrites it's own error message

This is a discussion on Kerberos code overwrites it's own error message within the Pgsql Patches forums, part of the PostgreSQL category; --> interfaces/libpq/fe-auth, line 621-622: <<snip>> if (pg_krb5_sendauth(PQerrormsg, conn->sock, hostname) != STATUS_OK) { snprintf(PQerrormsg, PQERRORMSG_LENGTH, libpq_gettext("Kerberos 5 authentication failed\n")); pgunlock_thread(); return ...


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-18-2008, 12:09 AM
Magnus Hagander
 
Posts: n/a
Default Kerberos code overwrites it's own error message

interfaces/libpq/fe-auth, line 621-622:
<<snip>>
if (pg_krb5_sendauth(PQerrormsg, conn->sock,

hostname) != STATUS_OK)
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
libpq_gettext("Kerberos 5
authentication failed\n"));
pgunlock_thread();
return STATUS_ERROR;
}
<<snip>>


It appears that libpq overwrites the actual error message from the
kerberos libraries with a generic "Kerberos 5 authentication failed"
message (PQerrormsg is passed in just for the reason of collecting the
error msg).'

Removing the snprintf() at these lines starts producing actual error
messages, which sure are helpful when it comes to debugging...

I've hacked around enough in those parts that I can't produce a clean
patch right now, but it should be easy enough to spot and fix without,
I'd think :-) If an actual patch is needed, I can provide one soon, but
I figured I should get the mail out there first...


Please consider fixing this in both 8.1 and 8.0.2.


//Magnus

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

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 04:31 PM.


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