small patch to crypt.c

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: small patch to crypt.c
Date: 2013-06-08 20:31:23
Message-ID: 51B3949B.9000604@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello,

In my quest to understand how all the logging etc works with
authentication I came across the area of crypt.c that checks for
valid_until but it seems like it has an extraneous check.

If I am wrong I apologize for the noise but wouldn't mind an explanation.

index f01d904..8d809b2 100644
--- a/src/backend/libpq/crypt.c
+++ b/src/backend/libpq/crypt.c
@@ -145,9 +145,7 @@ md5_crypt_verify(const Port *port, const char *role,
char *client_pass)
/*
* Password OK, now check to be sure we are not past
rolvaliduntil
*/
- if (isnull)
- retval = STATUS_OK;
- else if (vuntil < GetCurrentTimestamp())
+ if (vuntil < GetCurrentTimestamp())
retval = STATUS_ERROR;
else
retval = STATUS_OK;

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2013-06-08 20:39:14 Re: Optimising Foreign Key checks
Previous Message Joshua D. Drake 2013-06-08 20:26:56 Re: Hard limit on WAL space used (because PANIC sucks)