X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fmodify.c;h=235acc536b0aa90e72648be87495c12b742c6a60;hb=e03d88fcc4533a88ba303c7ba8faa8aa0e4ec775;hp=75e2224a2c2404cf2893e01224857e71599094ff;hpb=7df4daffcd069df21814a40c3eb74caa17bb1a5a;p=openldap diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index 75e2224a2c..235acc536b 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -10,12 +10,14 @@ * is provided ``as is'' without express or implied warranty. */ +#include "portable.h" + #include -#include -#include -#include -#include -#include + +#include +#include +#include + #include "slap.h" extern Backend *select_backend(); @@ -27,6 +29,8 @@ extern int global_lastmod; static void modlist_free(); static void add_lastmods(); +extern char *suffixAlias(); + void do_modify( @@ -147,6 +151,9 @@ do_modify( return; } + /* alias suffix if approp */ + dn = suffixAlias ( dn, op, be ); + /* * do the modify if 1 && (2 || 3) * 1) there is a modify function implemented in this backend; @@ -200,7 +207,7 @@ modlist_free( static void add_lastmods( Operation *op, LDAPMod **mods ) { - char buf[20]; + char buf[22]; struct berval bv; struct berval *bvals[2]; LDAPMod **m; @@ -251,8 +258,13 @@ add_lastmods( Operation *op, LDAPMod **mods ) *mods = tmp; pthread_mutex_lock( ¤ttime_mutex ); - ltm = localtime( ¤ttime ); - strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm ); +#ifndef LDAP_LOCALTIME + ltm = gmtime( ¤ttime ); + strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm ); +#else + ltm = localtime( ¤ttime ); + strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm ); +#endif pthread_mutex_unlock( ¤ttime_mutex ); bv.bv_val = buf; bv.bv_len = strlen( bv.bv_val );