* is provided ``as is'' without express or implied warranty.
*/
+#include "portable.h"
+
#include <stdio.h>
-#include <string.h>
-#include <time.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+#include <ac/time.h>
+
#include "slap.h"
extern Backend *select_backend();
static void modlist_free();
static void add_lastmods();
+extern char *suffixAlias();
+
void
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;
static void
add_lastmods( Operation *op, LDAPMod **mods )
{
- char buf[20];
+ char buf[22];
struct berval bv;
struct berval *bvals[2];
LDAPMod **m;
*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 );