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)
9696 version );
9797 if (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 ]);
101102 fputs (PQerrormsg , stderr );
102103 pqdebug ("%s" , PQerrormsg );
103104 return STATUS_ERROR ;
104105 }
105106 if (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 );
109111 fputs (PQerrormsg , stderr );
110112 pqdebug ("%s" , PQerrormsg );
111113 return STATUS_ERROR ;
112114 }
113115 if (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" ,
117119 port -> user , auth_data .pname );
118120 fputs (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" );
131133 fputs (PQerrormsg , stderr );
132134 pqdebug ("%s" , PQerrormsg );
133135
@@ -220,7 +222,7 @@ pg_krb5_recvauth(Port *port)
220222 * hostp = '\0' ;
221223 if (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 );
225227 com_err ("pg_krb5_recvauth" , code , "in krb5_parse_name" );
226228 return 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 );
258260 com_err ("pg_krb5_recvauth" , code , "in krb5_recvauth" );
259261 krb5_free_principal (server );
@@ -268,7 +270,7 @@ pg_krb5_recvauth(Port *port)
268270 */
269271 if ((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 );
273275 com_err ("pg_krb5_recvauth" , code , "in krb5_unparse_name" );
274276 krb5_free_principal (client );
@@ -277,7 +279,7 @@ pg_krb5_recvauth(Port *port)
277279 krb5_free_principal (client );
278280 if (!kusername )
279281 {
280- snprintf (PQerrormsg , ERROR_MSG_LENGTH ,
282+ snprintf (PQerrormsg , PQERRORMSG_LENGTH ,
281283 "pg_krb5_recvauth: could not decode username\n" );
282284 fputs (PQerrormsg , stderr );
283285 pqdebug ("%s" , PQerrormsg );
@@ -286,7 +288,7 @@ pg_krb5_recvauth(Port *port)
286288 kusername = pg_an_to_ln (kusername );
287289 if (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 );
291293 fputs (PQerrormsg , stderr );
292294 pqdebug ("%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" );
306308 fputs (PQerrormsg , stderr );
307309 pqdebug ("%s" , PQerrormsg );
@@ -356,7 +358,7 @@ pg_passwordv0_recvauth(void *arg, PacketLen len, void *pkt)
356358
357359 if (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" );
361363 fputs (PQerrormsg , stderr );
362364 pqdebug ("%s" , PQerrormsg );
0 commit comments