mirror of
https://github.com/postgres/postgres.git
synced 2025-07-18 17:42:25 +03:00
Make password null on startup.
This commit is contained in:
@ -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