77 *
88 *
99 * IDENTIFICATION
10- * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.41 1999/09/27 03:12:58 momjian Exp $
10+ * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.42 1999/10/23 03:13:21 tgl Exp $
1111 *
1212 *-------------------------------------------------------------------------
1313 */
@@ -96,23 +96,25 @@ pg_krb4_recvauth(Port *port)
9696version );
9797if (status != KSUCCESS )
9898{
99- snprintf (PQerrormsg ,ERROR_MSG_LENGTH ,
100- "pg_krb4_recvauth: kerberos error: %s\n" ,krb_err_txt [status ]);
99+ snprintf (PQerrormsg ,PQERRORMSG_LENGTH ,
100+ "pg_krb4_recvauth: kerberos error: %s\n" ,
101+ krb_err_txt [status ]);
101102fputs (PQerrormsg ,stderr );
102103pqdebug ("%s" ,PQerrormsg );
103104return STATUS_ERROR ;
104105}
105106if (strncmp (version ,PG_KRB4_VERSION ,KRB_SENDAUTH_VLEN ))
106107{
107- snprintf (PQerrormsg ,ERROR_MSG_LENGTH ,
108- "pg_krb4_recvauth: protocol version != \"%s\"\n" ,PG_KRB4_VERSION );
108+ snprintf (PQerrormsg ,PQERRORMSG_LENGTH ,
109+ "pg_krb4_recvauth: protocol version != \"%s\"\n" ,
110+ PG_KRB4_VERSION );
109111fputs (PQerrormsg ,stderr );
110112pqdebug ("%s" ,PQerrormsg );
111113return STATUS_ERROR ;
112114}
113115if (strncmp (port -> user ,auth_data .pname ,SM_USER ))
114116{
115- snprintf (PQerrormsg ,ERROR_MSG_LENGTH ,
117+ snprintf (PQerrormsg ,PQERRORMSG_LENGTH ,
116118"pg_krb4_recvauth: name \"%s\" != \"%s\"\n" ,
117119port -> user ,auth_data .pname );
118120fputs (PQerrormsg ,stderr );
@@ -126,8 +128,8 @@ pg_krb4_recvauth(Port *port)
126128static int
127129pg_krb4_recvauth (Port * port )
128130{
129- snprintf (PQerrormsg ,ERROR_MSG_LENGTH ,
130- "pg_krb4_recvauth: Kerberos not implemented on this server.\n" );
131+ snprintf (PQerrormsg ,PQERRORMSG_LENGTH ,
132+ "pg_krb4_recvauth: Kerberos not implemented on this server.\n" );
131133fputs (PQerrormsg ,stderr );
132134pqdebug ("%s" ,PQerrormsg );
133135
@@ -220,7 +222,7 @@ pg_krb5_recvauth(Port *port)
220222* hostp = '\0' ;
221223if (code = krb5_parse_name (servbuf ,& server ))
222224{
223- snprintf (PQerrormsg ,ERROR_MSG_LENGTH ,
225+ snprintf (PQerrormsg ,PQERRORMSG_LENGTH ,
224226"pg_krb5_recvauth: Kerberos error %d in krb5_parse_name\n" ,code );
225227com_err ("pg_krb5_recvauth" ,code ,"in krb5_parse_name" );
226228return STATUS_ERROR ;
@@ -253,7 +255,7 @@ pg_krb5_recvauth(Port *port)
253255 (krb5_ticket * * )NULL ,
254256 (krb5_authenticator * * )NULL ))
255257{
256- snprintf (PQerrormsg ,ERROR_MSG_LENGTH ,
258+ snprintf (PQerrormsg ,PQERRORMSG_LENGTH ,
257259"pg_krb5_recvauth: Kerberos error %d in krb5_recvauth\n" ,code );
258260com_err ("pg_krb5_recvauth" ,code ,"in krb5_recvauth" );
259261krb5_free_principal (server );
@@ -268,7 +270,7 @@ pg_krb5_recvauth(Port *port)
268270 */
269271if ((code = krb5_unparse_name (client ,& kusername )))
270272{
271- snprintf (PQerrormsg ,ERROR_MSG_LENGTH ,
273+ snprintf (PQerrormsg ,PQERRORMSG_LENGTH ,
272274"pg_krb5_recvauth: Kerberos error %d in krb5_unparse_name\n" ,code );
273275com_err ("pg_krb5_recvauth" ,code ,"in krb5_unparse_name" );
274276krb5_free_principal (client );
@@ -277,7 +279,7 @@ pg_krb5_recvauth(Port *port)
277279krb5_free_principal (client );
278280if (!kusername )
279281{
280- snprintf (PQerrormsg ,ERROR_MSG_LENGTH ,
282+ snprintf (PQerrormsg ,PQERRORMSG_LENGTH ,
281283"pg_krb5_recvauth: could not decode username\n" );
282284fputs (PQerrormsg ,stderr );
283285pqdebug ("%s" ,PQerrormsg );
@@ -286,7 +288,7 @@ pg_krb5_recvauth(Port *port)
286288kusername = pg_an_to_ln (kusername );
287289if (strncmp (username ,kusername ,SM_USER ))
288290{
289- snprintf (PQerrormsg ,ERROR_MSG_LENGTH ,
291+ snprintf (PQerrormsg ,PQERRORMSG_LENGTH ,
290292"pg_krb5_recvauth: name \"%s\" != \"%s\"\n" ,port -> user ,kusername );
291293fputs (PQerrormsg ,stderr );
292294pqdebug ("%s" ,PQerrormsg );
@@ -301,7 +303,7 @@ pg_krb5_recvauth(Port *port)
301303static int
302304pg_krb5_recvauth (Port * port )
303305{
304- snprintf (PQerrormsg ,ERROR_MSG_LENGTH ,
306+ snprintf (PQerrormsg ,PQERRORMSG_LENGTH ,
305307"pg_krb5_recvauth: Kerberos not implemented on this server.\n" );
306308fputs (PQerrormsg ,stderr );
307309pqdebug ("%s" ,PQerrormsg );
@@ -356,7 +358,7 @@ pg_passwordv0_recvauth(void *arg, PacketLen len, void *pkt)
356358
357359if (user == NULL || password == NULL )
358360{
359- snprintf (PQerrormsg ,ERROR_MSG_LENGTH ,
361+ snprintf (PQerrormsg ,PQERRORMSG_LENGTH ,
360362"pg_password_recvauth: badly formed password packet.\n" );
361363fputs (PQerrormsg ,stderr );
362364pqdebug ("%s" ,PQerrormsg );