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

Netscape Roaming Access Extension (ITS#424)



Full_Name: Martin Ohmacht
Version: 1.2.7
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (130.75.30.235)


The openldap slapd has problems cooperating with netscape communicator roaming 
access capability. Netscape relies on the modifytimestamp. It creates objects
and expects them to contain a modifytimestamp. Openldap creates this stamp
only when a modify command is processed. As netscape only modifies an entry when
it
can determine the age of this entry, it will consequently never alter any
created 
but unmodified entry. 
Initializing the database with manually modifyied entries doesn't help as
netscape
may create (nearly) arbitrarily named entries.
To overcome this problem, I patched the add.c module. Now, every created entry
gets 
both create- and modifytimestamp.

Patch:

Copyright 1999, Martin Ohmacht, All rights reserved.
     This software is not subject to any license of University of Hannover.

     This is free software; you can redistribute and use it
     under the same terms as OpenLDAP itself.

diff -c ldap.orig/servers/slapd/add.c ldap/servers/slapd/add.c
*** ldap/servers/slapd/add.c	Fri Jan 29 06:11:49 1999
--- ldap/servers/slapd/add.c	Mon Jan 17 09:41:23 2000
***************
*** 180,185 ****
--- 180,186 ----
  		bv.bv_len = strlen( bv.bv_val );
  	}
  	attr_merge( e, "creatorsname", bvals );
+ 	attr_merge( e, "modifiersname", bvals );
  
  	ldap_pvt_thread_mutex_lock( &currenttime_mutex );
  #ifndef LDAP_LOCALTIME
***************
*** 194,197 ****
--- 195,199 ----
  	bv.bv_val = buf;
  	bv.bv_len = strlen( bv.bv_val );
  	attr_merge( e, "createtimestamp", bvals );
+ 	attr_merge( e, "modifytimestamp", bvals );
  }

I hope this patch helps anyone who has the same trouble and will hopefully
get someday into the distribution (eventually configurable by slapd.conf?).

So long,

Martin