1
0
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:
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

@ -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;