1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-28 18:48:04 +03:00

Allow pg_ctl to determine the server is up when getting a request for a

password.

Make password error message a #define and use it consistently.

Sean Chittenden
This commit is contained in:
Bruce Momjian
2004-10-16 03:10:17 +00:00
parent 9ffc8ed58b
commit 88fd162ef6
8 changed files with 22 additions and 17 deletions

View File

@@ -10,7 +10,7 @@
* exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes).
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.93 2004/09/28 00:06:02 momjian Exp $
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.94 2004/10/16 03:10:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -634,7 +634,7 @@ fe_sendauth(AuthRequest areq, PGconn *conn, const char *hostname,
if (password == NULL || *password == '\0')
{
(void) snprintf(PQerrormsg, PQERRORMSG_LENGTH,
"fe_sendauth: no password supplied\n");
PQnoPasswordSupplied);
return STATUS_ERROR;
}
if (pg_password_sendauth(conn, password, areq) != STATUS_OK)

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.108 2004/08/29 05:07:00 momjian Exp $
* $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.109 2004/10/16 03:10:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -398,6 +398,9 @@ extern void PQfreemem(void *ptr);
/* Exists for backward compatibility. bjm 2003-03-24 */
#define PQfreeNotify(ptr) PQfreemem(ptr)
/* Define the string so all uses are consistent. */
#define PQnoPasswordSupplied "fe_sendauth: no password supplied\n"
/*
* Make an empty PGresult with given status (some apps find this
* useful). If conn is not NULL and status indicates an error, the