[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ITS #7161, ppolicy pwdFailureTime resolution should be better than 1 second



Paul B. Henson wrote:
I realize that development discussion is supposed to go to
openldap-devel, but despite having subscribed to that a month ago, none
of my postings have gone through. I hear they are having some technical
difficulties with that list, so for the sake of this submission not
being indefinitely delayed, here it is.

Attached is a proposed patch to fix ITS #7161. It uses the same method
as the accesslog module to generate a subsecond generalized time,
appending the o_tincr value from the operation structure as fractional
seconds. The only other code that looks at the value of that attribute
calls parse_time to pull seconds out of it (ignoring the fractional
second part), so other than modifying the format the attribute is stored
in I don't believe there are any other changes required with this.

The patch has a couple of issues - you have completely changed the semantics of the timestamp. The code explicitly used "now" - the current time when the operation completed, and you have changed it to use op->o_time, which is the time when the operation was first received. You said all you wanted to do was add microseconds, but this patch changes much more than that.

Aside from that, there's no reason to make a 2nd redundant call to slap_timestamp - just copy the result from timestr to failtimestr.

Rejecting this patch.

--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/