small patch to crypt.c - Mailing list pgsql-hackers

From Joshua D. Drake
Subject small patch to crypt.c
Date
Msg-id 51B3949B.9000604@commandprompt.com
Whole thread Raw
Responses Re: small patch to crypt.c
List 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;
 



pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Hard limit on WAL space used (because PANIC sucks)
Next
From: Simon Riggs
Date:
Subject: Re: Optimising Foreign Key checks