Re: [HACKERS] small patch to crypt.c

2013-06-09 Thread Joshua D. Drake
On 06/09/2013 09:28 AM, Tom Lane wrote: Even aside from that, the proposed change seems like a bad idea because it introduces an unnecessary call of GetCurrentTimestamp() in the common case where there's no valuntil limit. On some platforms that call is pretty slow. And that would explain wh

Re: [HACKERS] small patch to crypt.c

2013-06-09 Thread Tom Lane
Stephen Frost writes: > Regardless, setting vuntil to some magic value that really means "it's > actually NULL", which is what you'd need to do in order to get rid of > that explicit check for null, doesn't strike me as a good idea. When a > value is null, we shouldn't be looking at the data at a

Re: [HACKERS] small patch to crypt.c

2013-06-08 Thread Stephen Frost
* Joshua D. Drake (j...@commandprompt.com) wrote: > Well I was more referring to the default is: > > check if null, if true return ok > check if valuntil < today, if true return error > else return ok > > To me we don't need the null check. However, when I tested it, > without the null check you

Re: [HACKERS] small patch to crypt.c

2013-06-08 Thread Joshua D. Drake
On 06/08/2013 08:47 PM, Stephen Frost wrote: JD, * Joshua D. Drake (j...@commandprompt.com) wrote: 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 wr

Re: [HACKERS] small patch to crypt.c

2013-06-08 Thread Stephen Frost
JD, * Joshua D. Drake (j...@commandprompt.com) wrote: > 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 would

[HACKERS] small patch to crypt.c

2013-06-08 Thread Joshua D. Drake
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 100