From ca43453b95c60fd24a3b7907a5bec447e2a88804 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 14 Jul 2001 01:26:02 +0000 Subject: [PATCH] Quick and dirty hack to add password modify replication. --- servers/slapd/back-ldbm/passwd.c | 12 +++++++----- servers/slapd/repl.c | 5 +++++ servers/slapd/tools/mimic.c | 5 +++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/servers/slapd/back-ldbm/passwd.c b/servers/slapd/back-ldbm/passwd.c index 9165831bad..c4f81e7c80 100644 --- a/servers/slapd/back-ldbm/passwd.c +++ b/servers/slapd/back-ldbm/passwd.c @@ -149,12 +149,14 @@ ldbm_back_exop_passwd( *text = "entry modify failed"; goto done; } - } - /* change the entry itself */ - if( id2entry_add( be, e ) != 0 ) { - *text = "entry update failed"; - rc = LDAP_OTHER; + /* change the entry itself */ + if( id2entry_add( be, e ) != 0 ) { + *text = "entry update failed"; + rc = LDAP_OTHER; + } + + replog( be, op, e->e_dn, &ml ); } done: diff --git a/servers/slapd/repl.c b/servers/slapd/repl.c index 443fe81d93..dc85c33a57 100644 --- a/servers/slapd/repl.c +++ b/servers/slapd/repl.c @@ -54,6 +54,11 @@ replog( fprintf( fp, "dn: %s\n", dn ); switch ( op->o_tag ) { + case LDAP_REQ_EXTENDED: + /* quick hack for extended operations */ + /* assume change parameter is a Modfications* */ + /* fall thru */ + case LDAP_REQ_MODIFY: fprintf( fp, "changetype: modify\n" ); ml = change; diff --git a/servers/slapd/tools/mimic.c b/servers/slapd/tools/mimic.c index b5d67cf970..55ea31cb56 100644 --- a/servers/slapd/tools/mimic.c +++ b/servers/slapd/tools/mimic.c @@ -163,3 +163,8 @@ void connection2anonymous( Connection *c ) assert(0); } +void replog( Backend *be, Operation *op, char *dn, void *change) +{ + assert(0); +} + -- 2.39.5