diff options
author | Bruce Momjian <bruce@momjian.us> | 1997-12-12 16:26:36 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1997-12-12 16:26:36 +0000 |
commit | ab179d6940ad9241fe0887b4c5e4664448ca3eb0 (patch) | |
tree | 0064a06e0567c5dcfe1987644c0f9fc6dfc08c93 /src/backend/libpq/crypt.c | |
parent | c60f70b53f26dafe50a3814086d0ff37b40ee71c (diff) |
Make password null on startup.
Diffstat (limited to 'src/backend/libpq/crypt.c')
-rw-r--r-- | src/backend/libpq/crypt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/libpq/crypt.c b/src/backend/libpq/crypt.c index a91ec8b161e..1386ff74acc 100644 --- a/src/backend/libpq/crypt.c +++ b/src/backend/libpq/crypt.c @@ -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; |