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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user