Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd9ddbda

Browse files
committed
> This change (I'm sure this will wrap poorly -- sorry):
>http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/libpq/pqcomm.h.diff?r1=1.85&r2=1.86>> modified SockAddr, but no corresponding change was made here> (fe-auth.c:612):>> case AUTH_REQ_KRB5:> #ifdef KRB5> if (pg_krb5_sendauth(PQerrormsg, conn->sock, &conn->laddr.in,> &conn->raddr.in,> hostname) != STATUS_OK)>> It's not obvious to me what the change ought to be though.This patch should hopefully fix both kerberos 4 and 5.Kurt Roeckx
1 parentafb17d9 commitd9ddbda

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

‎src/backend/libpq/auth.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.102 2003/06/12 07:36:51 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.103 2003/06/25 01:19:47 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -430,6 +430,13 @@ ClientAuthentication(Port *port)
430430
}
431431

432432
caseuaKrb4:
433+
/* Kerberos 4 only seems to work with AF_INET. */
434+
if (port->raddr.addr.ss_family!=AF_INET
435+
||port->laddr.addr.ss_family!=AF_INET)
436+
{
437+
elog(FATAL,
438+
"Unsupported protocol for Kerberos 4");
439+
}
433440
sendAuthRequest(port,AUTH_REQ_KRB4);
434441
status=pg_krb4_recvauth(port);
435442
break;

‎src/interfaces/libpq/fe-auth.c

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes).
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.80 2003/06/14 17:49:53 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.81 2003/06/25 01:19:47 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -357,10 +357,7 @@ pg_krb5_authname(char *PQerrormsg)
357357
* the server
358358
*/
359359
staticint
360-
pg_krb5_sendauth(char*PQerrormsg,intsock,
361-
structsockaddr_in*laddr,
362-
structsockaddr_in*raddr,
363-
constchar*hostname)
360+
pg_krb5_sendauth(char*PQerrormsg,intsock,constchar*hostname)
364361
{
365362
krb5_error_coderetval;
366363
intret;
@@ -594,9 +591,10 @@ fe_sendauth(AuthRequest areq, PGconn *conn, const char *hostname,
594591

595592
caseAUTH_REQ_KRB4:
596593
#ifdefKRB4
597-
if (pg_krb4_sendauth(PQerrormsg,conn->sock,&conn->laddr.in,
598-
&conn->raddr.in,
599-
hostname)!=STATUS_OK)
594+
if (pg_krb4_sendauth(PQerrormsg,conn->sock,
595+
(structsockaddr_in*)&conn->laddr.addr,
596+
(structsockaddr_in*)&conn->raddr.addr,
597+
hostname)!=STATUS_OK)
600598
{
601599
snprintf(PQerrormsg,PQERRORMSG_LENGTH,
602600
libpq_gettext("Kerberos 4 authentication failed\n"));
@@ -611,9 +609,8 @@ fe_sendauth(AuthRequest areq, PGconn *conn, const char *hostname,
611609

612610
caseAUTH_REQ_KRB5:
613611
#ifdefKRB5
614-
if (pg_krb5_sendauth(PQerrormsg,conn->sock,&conn->laddr.in,
615-
&conn->raddr.in,
616-
hostname)!=STATUS_OK)
612+
if (pg_krb5_sendauth(PQerrormsg,conn->sock,
613+
hostname)!=STATUS_OK)
617614
{
618615
snprintf(PQerrormsg,PQERRORMSG_LENGTH,
619616
libpq_gettext("Kerberos 5 authentication failed\n"));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp