[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Issue(s) with lastmod in slapd.conf
I commited to -devel a simple patch to use gmtime() by default.
I've also switched the default year format to %Y Use
-DLDAP_LOCALTIME to get the old behavior (localtime() and %y).
This patch will likely make its way into -stable within a few
days and will be included in the next release.
The first, %y -> %Y, of the recent series (Alan Sparks, "Y2K patch
for slapd -- modify/create timestamps") was redundant. That is, a
similar change had already been made to -devel (but not yet applied
to -stable). The change was behind the now depreciated LDAP_Y2K ifdef.
On the -general list there was another patch
(patl@phoenix.volant.org, "Slapd strftime(3) ISO-8601 patch")
which externalized the time format and time function to slapd.conf.
However, as was pointed out, applying the patch would make OpenLDAP
non-compliant with the RFCs (missing timezone with localtime and
addition of separators).
As far as supporting local or user-specified timezones, I
would recommend interested parties strike up a thread on -devel.
At 10:03 AM 10/21/98 -0600, Daniel Carroll wrote:
>
>Hello,
>
> I had a question about the 'lastmod' construct in the slapd.conf file:
>After looking at the bugs mailing list, I see that it's been mentioned,
>and about 5 small patches were submitted, but have not been rolled
>into the development tree yet... (Due to the 'Z' timezone issue, and
>the ISO (optional?) separator compliance issue?). Have any decisions
>been made about it?
>
> My personal vote would be to go with UTC time, but another option
>would be to extend the syntax in the slapd.conf file to something like:
>
> lastmod: <on|off|utc> where on <=> local time (since that's the
> current behaviour)
>
>
>
> On a related subject: I was working with the shell backend, seeing
>what the 'modify' command would generate for output, and I was getting
>output like this:
>
> MODIFY
> msgid: 2
> suffix: o=Some Site,c=US
> dn: cn=Some value, o=Some Site, c=US
> replace: modifytimestampmodifytimestamp: 981021095151Z
> replace: modifiersnamemodifiersname: cn=root,o=Some Site,c=US
> add: myattrmyattr: my value for this attribute
> delete: oldattroldattr: old value for this attr
> replace: someattrsomeattr: the value is now different
>
>>From the looks of it, there's a missing newline after the attribute
>being modified. If that's the case, here's a patch to fix that:
>
> - Dan (Daniel Carroll - dan@mesastate.edu)
>
>*** servers/slapd/back-shell/modify.c Wed Oct 21 09:55:40 1998
>--- servers/slapd/back-shell/modify.c~ Wed Oct 21 09:55:24 1998
>***************
>*** 41,55 ****
> for ( ; mods != NULL; mods = mods->mod_next ) {
> switch ( mods->mod_op & ~LDAP_MOD_BVALUES ) {
> case LDAP_MOD_ADD:
>! fprintf( wfp, "add: %s\n", mods->mod_type );
> break;
>
> case LDAP_MOD_DELETE:
>! fprintf( wfp, "delete: %s\n", mods->mod_type );
> break;
>
> case LDAP_MOD_REPLACE:
>! fprintf( wfp, "replace: %s\n", mods->mod_type );
> break;
> }
>
>--- 41,55 ----
> for ( ; mods != NULL; mods = mods->mod_next ) {
> switch ( mods->mod_op & ~LDAP_MOD_BVALUES ) {
> case LDAP_MOD_ADD:
>! fprintf( wfp, "add: %s", mods->mod_type );
> break;
>
> case LDAP_MOD_DELETE:
>! fprintf( wfp, "delete: %s", mods->mod_type );
> break;
>
> case LDAP_MOD_REPLACE:
>! fprintf( wfp, "replace: %s", mods->mod_type );
> break;
> }
>
>
>