[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
RE: slap_timestamp with microsecond granularity?
- To: "'Michael Ströder'" <michael@stroeder.com>, <openldap-technical@openldap.org>
- Subject: RE: slap_timestamp with microsecond granularity?
- From: "Paul B. Henson" <henson@acm.org>
- Date: Tue, 29 Apr 2014 12:16:59 -0700
- Content-language: en-us
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:references:in-reply-to:subject:date:message-id :mime-version:content-type:content-transfer-encoding:thread-index :content-language; bh=dB2Hj3dCCQXC4iNnKq6mXnbpySJub20IQZqW28NhLnQ=; b=QOVgFKX3W+43LeWqsfiEG+9xV699OJBgy9ALfB4eE/LXA+/gsv8gGLF0w+a74vxe/p gi8hQfLlZ2eu+DK/lJsjTeGeE4AVrscY3tYcLezc9KRn1wEr7basZzrz2PLSqTMXnijr WX4sxuRdsvipN2Qhqt7xVpYzo1YiGhRGWzg6l+u2+BFkdRvDUJZDJVfNytiSa4G1G2ku OZ6wqNzcOvnZWPNu+9jiaXA96/EtwLSCc5P5SFC/TvRWkM/lVHTe1Rjaw0nWDCbXC4Ke fldC3GGVFIvIPZRRSaW4MPQ65PnnCbV9dlWFNeWeanQEL0DC6AB1V9Rrsf2WBJf/Nkdo 0NTg==
- In-reply-to: <535F4ACE.5080807@stroeder.com>
- References: <20140429031735.GC1541@bender.unx.csupomona.edu> <535F4ACE.5080807@stroeder.com>
- Thread-index: AQJMlwggzSDKL2VpnOGArX5iCCsWgAGrQVA2miE1kSA=
> From: Michael Ströder
> Sent: Monday, April 28, 2014 11:47 PM
>
> slapo-accesslog records fractions of a second in attributes reqStart and
> reqEnd which both are declared use Generalized Time syntax.
Cool, thanks for the pointer. It looks like that code uses the second of the
options I considered, generating a one second granularity timestamp with the
existing function and then mashing the microseconds on top of it. Given that
method is evidently acceptable for this module, presumably it would also be
acceptable in the password policy module.
char rdnbuf[STRLENOF(RDNEQ)+LDAP_LUTIL_GENTIME_BUFSIZE+8];
[...]
slap_timestamp( &op->o_time, ×tamp );
snprintf( timestamp.bv_val + timestamp.bv_len-1, sizeof(".123456Z"),
".%06dZ", op->o_tincr );
timestamp.bv_len += STRLENOF(".123456");
Even more conveniently, it looks like it's getting the microseconds value
from a member of the op structure, the ppolicy_bind_response function in
servers/slapd/overlays/ppolicy.c also has an op structure passed in, which
presumably should have the same microseconds value, so it looks like it
would be very trivial to emulate the above timestamp generating code in the
password policy module.
Thanks?