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

Commit9cab13c

Browse files
committed
I've been having also sorts of fun trying to get kerberos 4
authentificationworking with postgresql-6.4.2 and KTH-KRB Ebones(http://www.pdc.kth.se/kth-krb) on a dec alpha running DU 4.0D using the native compiler. Thefollowingpatch does the trick.The rationale behind this is as follows. The KTH-KRB code header filesdefineslots of lengths like INST_SZ,REALM_SZ and KRB_SENDAUTH_VLEN. It also hasahabit of doing things like chararray[LENGTH] = '\0'to ensure null terminated strings. In my instance this just happens toblatthe kerberos principal instance string leading to error like pg_krb4_recvauth: kerberos error: Can't decode authenticator(krb_rd_req)The application code that comes with KTH-KRB uses "KRB_SENDAUTH_VLEN +1" andsometimes uses "INST_SZ + 1" so it seems safest to put that 1 charbuffer inthe appropriate place.Rodney McDuff
1 parentaba8c12 commit9cab13c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

‎src/backend/libpq/auth.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.33 1999/02/13 23:15:38 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.34 1999/03/14 16:06:42 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -77,8 +77,8 @@ pg_krb4_recvauth(Port *port)
7777
{
7878
longkrbopts=0;/* one-way authentication */
7979
KTEXT_STclttkt;
80-
charinstance[INST_SZ],
81-
version[KRB_SENDAUTH_VLEN];
80+
charinstance[INST_SZ+1],
81+
version[KRB_SENDAUTH_VLEN+1];
8282
AUTH_DATauth_data;
8383
Key_schedulekey_sched;
8484
intstatus;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.26 1999/02/13 23:22:39 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.27 1999/03/14 16:06:43 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -144,8 +144,8 @@ pg_krb4_init()
144144
staticchar*
145145
pg_krb4_authname(char*PQerrormsg)
146146
{
147-
charinstance[INST_SZ];
148-
charrealm[REALM_SZ];
147+
charinstance[INST_SZ+1];
148+
charrealm[REALM_SZ+1];
149149
intstatus;
150150
staticcharname[SNAME_SZ+1]="";
151151

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp