1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Make password null on startup.

This commit is contained in:
Bruce Momjian
1997-12-12 16:26:36 +00:00
parent c60f70b53f
commit ab179d6940
4 changed files with 35 additions and 14 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.10 1997/12/06 22:56:35 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.11 1997/12/12 16:26:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -143,11 +143,11 @@ PQexec(char *query)
be_portalpush(entry);
/* ----------------
* pg_eval_dest will put the query results in a portal which will
* pg_exec_query_dest will put the query results in a portal which will
* end up on the top of the portal stack.
* ----------------
*/
pg_eval_dest(query, (char **) NULL, (Oid *) NULL, 0, Local);
pg_exec_query_dest(query, (char **) NULL, (Oid *) NULL, 0, Local);
/* ----------------
* pop the portal off the portal stack and return the

View File

@@ -17,6 +17,7 @@
#endif
#include "postgres.h"
#include "miscadmin.h"
#include "libpq/crypt.h"
#include "utils/nabstime.h"
#include "utils/palloc.h"
@@ -129,7 +130,7 @@ MsgType crypt_salt(const char* user) {
crypt_getloginfo(user, &passwd, &valuntil);
if (passwd == NULL || *passwd == '\0') {
if (passwd == NULL || *passwd == '\0' || !strcmp(passwd, "\\N")) {
if (passwd) pfree((void*)passwd);
if (valuntil) pfree((void*)valuntil);
return STARTUP_UNSALT_MSG;