|
|
5873fa |
From a1cd3cf8e8b6b33ab21d5338921187a76dd9dcd0 Mon Sep 17 00:00:00 2001
|
|
|
5873fa |
From: Mark Reynolds <mreynolds@redhat.com>
|
|
|
5873fa |
Date: Fri, 22 May 2020 15:41:45 -0400
|
|
|
5873fa |
Subject: [PATCH 07/12] Issue 51110 - Fix ASAN ODR warnings
|
|
|
5873fa |
|
|
|
5873fa |
Description: Fixed ODR issues with glboal attributes which were duplicated from
|
|
|
5873fa |
the core server into the replication and retrocl plugins.
|
|
|
5873fa |
|
|
|
5873fa |
relates: https://pagure.io/389-ds-base/issue/51110
|
|
|
5873fa |
|
|
|
5873fa |
Reviewed by: firstyear(Thanks!)
|
|
|
5873fa |
---
|
|
|
5873fa |
ldap/servers/plugins/replication/repl5.h | 17 +++---
|
|
|
5873fa |
.../plugins/replication/repl_globals.c | 17 +++---
|
|
|
5873fa |
ldap/servers/plugins/replication/replutil.c | 16 +++---
|
|
|
5873fa |
ldap/servers/plugins/retrocl/retrocl.h | 22 ++++----
|
|
|
5873fa |
ldap/servers/plugins/retrocl/retrocl_cn.c | 12 ++---
|
|
|
5873fa |
ldap/servers/plugins/retrocl/retrocl_po.c | 52 +++++++++----------
|
|
|
5873fa |
ldap/servers/plugins/retrocl/retrocl_trim.c | 30 +++++------
|
|
|
5873fa |
7 files changed, 82 insertions(+), 84 deletions(-)
|
|
|
5873fa |
|
|
|
5873fa |
diff --git a/ldap/servers/plugins/replication/repl5.h b/ldap/servers/plugins/replication/repl5.h
|
|
|
5873fa |
index 873dd8a16..72b7089e3 100644
|
|
|
5873fa |
--- a/ldap/servers/plugins/replication/repl5.h
|
|
|
5873fa |
+++ b/ldap/servers/plugins/replication/repl5.h
|
|
|
5873fa |
@@ -280,15 +280,14 @@ struct berval *NSDS90StartReplicationRequest_new(const char *protocol_oid,
|
|
|
5873fa |
int multimaster_extop_NSDS50ReplicationEntry(Slapi_PBlock *pb);
|
|
|
5873fa |
|
|
|
5873fa |
/* From repl_globals.c */
|
|
|
5873fa |
-extern char *attr_changenumber;
|
|
|
5873fa |
-extern char *attr_targetdn;
|
|
|
5873fa |
-extern char *attr_changetype;
|
|
|
5873fa |
-extern char *attr_newrdn;
|
|
|
5873fa |
-extern char *attr_deleteoldrdn;
|
|
|
5873fa |
-extern char *attr_changes;
|
|
|
5873fa |
-extern char *attr_newsuperior;
|
|
|
5873fa |
-extern char *attr_changetime;
|
|
|
5873fa |
-extern char *attr_dataversion;
|
|
|
5873fa |
+extern char *repl_changenumber;
|
|
|
5873fa |
+extern char *repl_targetdn;
|
|
|
5873fa |
+extern char *repl_changetype;
|
|
|
5873fa |
+extern char *repl_newrdn;
|
|
|
5873fa |
+extern char *repl_deleteoldrdn;
|
|
|
5873fa |
+extern char *repl_changes;
|
|
|
5873fa |
+extern char *repl_newsuperior;
|
|
|
5873fa |
+extern char *repl_changetime;
|
|
|
5873fa |
extern char *attr_csn;
|
|
|
5873fa |
extern char *changetype_add;
|
|
|
5873fa |
extern char *changetype_delete;
|
|
|
5873fa |
diff --git a/ldap/servers/plugins/replication/repl_globals.c b/ldap/servers/plugins/replication/repl_globals.c
|
|
|
5873fa |
index 355a0ffa1..c615c77da 100644
|
|
|
5873fa |
--- a/ldap/servers/plugins/replication/repl_globals.c
|
|
|
5873fa |
+++ b/ldap/servers/plugins/replication/repl_globals.c
|
|
|
5873fa |
@@ -48,15 +48,14 @@ char *changetype_delete = CHANGETYPE_DELETE;
|
|
|
5873fa |
char *changetype_modify = CHANGETYPE_MODIFY;
|
|
|
5873fa |
char *changetype_modrdn = CHANGETYPE_MODRDN;
|
|
|
5873fa |
char *changetype_moddn = CHANGETYPE_MODDN;
|
|
|
5873fa |
-char *attr_changenumber = ATTR_CHANGENUMBER;
|
|
|
5873fa |
-char *attr_targetdn = ATTR_TARGETDN;
|
|
|
5873fa |
-char *attr_changetype = ATTR_CHANGETYPE;
|
|
|
5873fa |
-char *attr_newrdn = ATTR_NEWRDN;
|
|
|
5873fa |
-char *attr_deleteoldrdn = ATTR_DELETEOLDRDN;
|
|
|
5873fa |
-char *attr_changes = ATTR_CHANGES;
|
|
|
5873fa |
-char *attr_newsuperior = ATTR_NEWSUPERIOR;
|
|
|
5873fa |
-char *attr_changetime = ATTR_CHANGETIME;
|
|
|
5873fa |
-char *attr_dataversion = ATTR_DATAVERSION;
|
|
|
5873fa |
+char *repl_changenumber = ATTR_CHANGENUMBER;
|
|
|
5873fa |
+char *repl_targetdn = ATTR_TARGETDN;
|
|
|
5873fa |
+char *repl_changetype = ATTR_CHANGETYPE;
|
|
|
5873fa |
+char *repl_newrdn = ATTR_NEWRDN;
|
|
|
5873fa |
+char *repl_deleteoldrdn = ATTR_DELETEOLDRDN;
|
|
|
5873fa |
+char *repl_changes = ATTR_CHANGES;
|
|
|
5873fa |
+char *repl_newsuperior = ATTR_NEWSUPERIOR;
|
|
|
5873fa |
+char *repl_changetime = ATTR_CHANGETIME;
|
|
|
5873fa |
char *attr_csn = ATTR_CSN;
|
|
|
5873fa |
char *type_copyingFrom = TYPE_COPYINGFROM;
|
|
|
5873fa |
char *type_copiedFrom = TYPE_COPIEDFROM;
|
|
|
5873fa |
diff --git a/ldap/servers/plugins/replication/replutil.c b/ldap/servers/plugins/replication/replutil.c
|
|
|
5873fa |
index de1e77880..39f821d12 100644
|
|
|
5873fa |
--- a/ldap/servers/plugins/replication/replutil.c
|
|
|
5873fa |
+++ b/ldap/servers/plugins/replication/replutil.c
|
|
|
5873fa |
@@ -64,14 +64,14 @@ get_cleattrs()
|
|
|
5873fa |
{
|
|
|
5873fa |
if (cleattrs[0] == NULL) {
|
|
|
5873fa |
cleattrs[0] = type_objectclass;
|
|
|
5873fa |
- cleattrs[1] = attr_changenumber;
|
|
|
5873fa |
- cleattrs[2] = attr_targetdn;
|
|
|
5873fa |
- cleattrs[3] = attr_changetype;
|
|
|
5873fa |
- cleattrs[4] = attr_newrdn;
|
|
|
5873fa |
- cleattrs[5] = attr_deleteoldrdn;
|
|
|
5873fa |
- cleattrs[6] = attr_changes;
|
|
|
5873fa |
- cleattrs[7] = attr_newsuperior;
|
|
|
5873fa |
- cleattrs[8] = attr_changetime;
|
|
|
5873fa |
+ cleattrs[1] = repl_changenumber;
|
|
|
5873fa |
+ cleattrs[2] = repl_targetdn;
|
|
|
5873fa |
+ cleattrs[3] = repl_changetype;
|
|
|
5873fa |
+ cleattrs[4] = repl_newrdn;
|
|
|
5873fa |
+ cleattrs[5] = repl_deleteoldrdn;
|
|
|
5873fa |
+ cleattrs[6] = repl_changes;
|
|
|
5873fa |
+ cleattrs[7] = repl_newsuperior;
|
|
|
5873fa |
+ cleattrs[8] = repl_changetime;
|
|
|
5873fa |
cleattrs[9] = NULL;
|
|
|
5873fa |
}
|
|
|
5873fa |
return cleattrs;
|
|
|
5873fa |
diff --git a/ldap/servers/plugins/retrocl/retrocl.h b/ldap/servers/plugins/retrocl/retrocl.h
|
|
|
5873fa |
index 06482a14c..2ce76fcec 100644
|
|
|
5873fa |
--- a/ldap/servers/plugins/retrocl/retrocl.h
|
|
|
5873fa |
+++ b/ldap/servers/plugins/retrocl/retrocl.h
|
|
|
5873fa |
@@ -94,17 +94,17 @@ extern int retrocl_nattributes;
|
|
|
5873fa |
extern char **retrocl_attributes;
|
|
|
5873fa |
extern char **retrocl_aliases;
|
|
|
5873fa |
|
|
|
5873fa |
-extern const char *attr_changenumber;
|
|
|
5873fa |
-extern const char *attr_targetdn;
|
|
|
5873fa |
-extern const char *attr_changetype;
|
|
|
5873fa |
-extern const char *attr_newrdn;
|
|
|
5873fa |
-extern const char *attr_newsuperior;
|
|
|
5873fa |
-extern const char *attr_deleteoldrdn;
|
|
|
5873fa |
-extern const char *attr_changes;
|
|
|
5873fa |
-extern const char *attr_changetime;
|
|
|
5873fa |
-extern const char *attr_objectclass;
|
|
|
5873fa |
-extern const char *attr_nsuniqueid;
|
|
|
5873fa |
-extern const char *attr_isreplicated;
|
|
|
5873fa |
+extern const char *retrocl_changenumber;
|
|
|
5873fa |
+extern const char *retrocl_targetdn;
|
|
|
5873fa |
+extern const char *retrocl_changetype;
|
|
|
5873fa |
+extern const char *retrocl_newrdn;
|
|
|
5873fa |
+extern const char *retrocl_newsuperior;
|
|
|
5873fa |
+extern const char *retrocl_deleteoldrdn;
|
|
|
5873fa |
+extern const char *retrocl_changes;
|
|
|
5873fa |
+extern const char *retrocl_changetime;
|
|
|
5873fa |
+extern const char *retrocl_objectclass;
|
|
|
5873fa |
+extern const char *retrocl_nsuniqueid;
|
|
|
5873fa |
+extern const char *retrocl_isreplicated;
|
|
|
5873fa |
|
|
|
5873fa |
extern PRLock *retrocl_internal_lock;
|
|
|
5873fa |
extern Slapi_RWLock *retrocl_cn_lock;
|
|
|
5873fa |
diff --git a/ldap/servers/plugins/retrocl/retrocl_cn.c b/ldap/servers/plugins/retrocl/retrocl_cn.c
|
|
|
5873fa |
index 709d7a857..5fc5f586d 100644
|
|
|
5873fa |
--- a/ldap/servers/plugins/retrocl/retrocl_cn.c
|
|
|
5873fa |
+++ b/ldap/servers/plugins/retrocl/retrocl_cn.c
|
|
|
5873fa |
@@ -62,7 +62,7 @@ handle_cnum_entry(Slapi_Entry *e, void *callback_data)
|
|
|
5873fa |
Slapi_Attr *chattr = NULL;
|
|
|
5873fa |
sval = NULL;
|
|
|
5873fa |
value = NULL;
|
|
|
5873fa |
- if (slapi_entry_attr_find(e, attr_changenumber, &chattr) == 0) {
|
|
|
5873fa |
+ if (slapi_entry_attr_find(e, retrocl_changenumber, &chattr) == 0) {
|
|
|
5873fa |
slapi_attr_first_value(chattr, &sval);
|
|
|
5873fa |
if (NULL != sval) {
|
|
|
5873fa |
value = slapi_value_get_berval(sval);
|
|
|
5873fa |
@@ -79,7 +79,7 @@ handle_cnum_entry(Slapi_Entry *e, void *callback_data)
|
|
|
5873fa |
chattr = NULL;
|
|
|
5873fa |
sval = NULL;
|
|
|
5873fa |
value = NULL;
|
|
|
5873fa |
- if (slapi_entry_attr_find(e, attr_changetime, &chattr) == 0) {
|
|
|
5873fa |
+ if (slapi_entry_attr_find(e, retrocl_changetime, &chattr) == 0) {
|
|
|
5873fa |
slapi_attr_first_value(chattr, &sval);
|
|
|
5873fa |
if (NULL != sval) {
|
|
|
5873fa |
value = slapi_value_get_berval(sval);
|
|
|
5873fa |
@@ -134,7 +134,7 @@ retrocl_get_changenumbers(void)
|
|
|
5873fa |
cr.cr_time = 0;
|
|
|
5873fa |
|
|
|
5873fa |
slapi_seq_callback(RETROCL_CHANGELOG_DN, SLAPI_SEQ_FIRST,
|
|
|
5873fa |
- (char *)attr_changenumber, /* cast away const */
|
|
|
5873fa |
+ (char *)retrocl_changenumber, /* cast away const */
|
|
|
5873fa |
NULL, NULL, 0, &cr, NULL, handle_cnum_result,
|
|
|
5873fa |
handle_cnum_entry, NULL);
|
|
|
5873fa |
|
|
|
5873fa |
@@ -144,7 +144,7 @@ retrocl_get_changenumbers(void)
|
|
|
5873fa |
slapi_ch_free((void **)&cr.cr_time);
|
|
|
5873fa |
|
|
|
5873fa |
slapi_seq_callback(RETROCL_CHANGELOG_DN, SLAPI_SEQ_LAST,
|
|
|
5873fa |
- (char *)attr_changenumber, /* cast away const */
|
|
|
5873fa |
+ (char *)retrocl_changenumber, /* cast away const */
|
|
|
5873fa |
NULL, NULL, 0, &cr, NULL, handle_cnum_result,
|
|
|
5873fa |
handle_cnum_entry, NULL);
|
|
|
5873fa |
|
|
|
5873fa |
@@ -185,7 +185,7 @@ retrocl_getchangetime(int type, int *err)
|
|
|
5873fa |
return NO_TIME;
|
|
|
5873fa |
}
|
|
|
5873fa |
slapi_seq_callback(RETROCL_CHANGELOG_DN, type,
|
|
|
5873fa |
- (char *)attr_changenumber, /* cast away const */
|
|
|
5873fa |
+ (char *)retrocl_changenumber, /* cast away const */
|
|
|
5873fa |
NULL,
|
|
|
5873fa |
NULL, 0, &cr, NULL,
|
|
|
5873fa |
handle_cnum_result, handle_cnum_entry, NULL);
|
|
|
5873fa |
@@ -353,7 +353,7 @@ retrocl_update_lastchangenumber(void)
|
|
|
5873fa |
cr.cr_cnum = 0;
|
|
|
5873fa |
cr.cr_time = 0;
|
|
|
5873fa |
slapi_seq_callback(RETROCL_CHANGELOG_DN, SLAPI_SEQ_LAST,
|
|
|
5873fa |
- (char *)attr_changenumber, /* cast away const */
|
|
|
5873fa |
+ (char *)retrocl_changenumber, /* cast away const */
|
|
|
5873fa |
NULL, NULL, 0, &cr, NULL, handle_cnum_result,
|
|
|
5873fa |
handle_cnum_entry, NULL);
|
|
|
5873fa |
|
|
|
5873fa |
diff --git a/ldap/servers/plugins/retrocl/retrocl_po.c b/ldap/servers/plugins/retrocl/retrocl_po.c
|
|
|
5873fa |
index d2af79b31..e1488f56b 100644
|
|
|
5873fa |
--- a/ldap/servers/plugins/retrocl/retrocl_po.c
|
|
|
5873fa |
+++ b/ldap/servers/plugins/retrocl/retrocl_po.c
|
|
|
5873fa |
@@ -25,17 +25,17 @@ modrdn2reple(Slapi_Entry *e, const char *newrdn, int deloldrdn, LDAPMod **ldm, c
|
|
|
5873fa |
|
|
|
5873fa |
/******************************/
|
|
|
5873fa |
|
|
|
5873fa |
-const char *attr_changenumber = "changenumber";
|
|
|
5873fa |
-const char *attr_targetdn = "targetdn";
|
|
|
5873fa |
-const char *attr_changetype = "changetype";
|
|
|
5873fa |
-const char *attr_newrdn = "newrdn";
|
|
|
5873fa |
-const char *attr_deleteoldrdn = "deleteoldrdn";
|
|
|
5873fa |
-const char *attr_changes = "changes";
|
|
|
5873fa |
-const char *attr_newsuperior = "newsuperior";
|
|
|
5873fa |
-const char *attr_changetime = "changetime";
|
|
|
5873fa |
-const char *attr_objectclass = "objectclass";
|
|
|
5873fa |
-const char *attr_nsuniqueid = "nsuniqueid";
|
|
|
5873fa |
-const char *attr_isreplicated = "isreplicated";
|
|
|
5873fa |
+const char *retrocl_changenumber = "changenumber";
|
|
|
5873fa |
+const char *retrocl_targetdn = "targetdn";
|
|
|
5873fa |
+const char *retrocl_changetype = "changetype";
|
|
|
5873fa |
+const char *retrocl_newrdn = "newrdn";
|
|
|
5873fa |
+const char *retrocl_deleteoldrdn = "deleteoldrdn";
|
|
|
5873fa |
+const char *retrocl_changes = "changes";
|
|
|
5873fa |
+const char *retrocl_newsuperior = "newsuperior";
|
|
|
5873fa |
+const char *retrocl_changetime = "changetime";
|
|
|
5873fa |
+const char *retrocl_objectclass = "objectclass";
|
|
|
5873fa |
+const char *retrocl_nsuniqueid = "nsuniqueid";
|
|
|
5873fa |
+const char *retrocl_isreplicated = "isreplicated";
|
|
|
5873fa |
|
|
|
5873fa |
/*
|
|
|
5873fa |
* Function: make_changes_string
|
|
|
5873fa |
@@ -185,7 +185,7 @@ write_replog_db(
|
|
|
5873fa |
changenum, dn);
|
|
|
5873fa |
|
|
|
5873fa |
/* Construct the dn of this change record */
|
|
|
5873fa |
- edn = slapi_ch_smprintf("%s=%lu,%s", attr_changenumber, changenum, RETROCL_CHANGELOG_DN);
|
|
|
5873fa |
+ edn = slapi_ch_smprintf("%s=%lu,%s", retrocl_changenumber, changenum, RETROCL_CHANGELOG_DN);
|
|
|
5873fa |
|
|
|
5873fa |
/*
|
|
|
5873fa |
* Create the entry struct, and fill in fields common to all types
|
|
|
5873fa |
@@ -214,7 +214,7 @@ write_replog_db(
|
|
|
5873fa |
attributeAlias = attributeName;
|
|
|
5873fa |
}
|
|
|
5873fa |
|
|
|
5873fa |
- if (strcasecmp(attributeName, attr_nsuniqueid) == 0) {
|
|
|
5873fa |
+ if (strcasecmp(attributeName, retrocl_nsuniqueid) == 0) {
|
|
|
5873fa |
Slapi_Entry *entry = NULL;
|
|
|
5873fa |
const char *uniqueId = NULL;
|
|
|
5873fa |
|
|
|
5873fa |
@@ -236,7 +236,7 @@ write_replog_db(
|
|
|
5873fa |
|
|
|
5873fa |
extensibleObject = 1;
|
|
|
5873fa |
|
|
|
5873fa |
- } else if (strcasecmp(attributeName, attr_isreplicated) == 0) {
|
|
|
5873fa |
+ } else if (strcasecmp(attributeName, retrocl_isreplicated) == 0) {
|
|
|
5873fa |
int isReplicated = 0;
|
|
|
5873fa |
char *attributeValue = NULL;
|
|
|
5873fa |
|
|
|
5873fa |
@@ -298,17 +298,17 @@ write_replog_db(
|
|
|
5873fa |
sprintf(chnobuf, "%lu", changenum);
|
|
|
5873fa |
val.bv_val = chnobuf;
|
|
|
5873fa |
val.bv_len = strlen(chnobuf);
|
|
|
5873fa |
- slapi_entry_add_values(e, attr_changenumber, vals);
|
|
|
5873fa |
+ slapi_entry_add_values(e, retrocl_changenumber, vals);
|
|
|
5873fa |
|
|
|
5873fa |
/* Set the targetentrydn attribute */
|
|
|
5873fa |
val.bv_val = dn;
|
|
|
5873fa |
val.bv_len = strlen(dn);
|
|
|
5873fa |
- slapi_entry_add_values(e, attr_targetdn, vals);
|
|
|
5873fa |
+ slapi_entry_add_values(e, retrocl_targetdn, vals);
|
|
|
5873fa |
|
|
|
5873fa |
/* Set the changeTime attribute */
|
|
|
5873fa |
val.bv_val = format_genTime(curtime);
|
|
|
5873fa |
val.bv_len = strlen(val.bv_val);
|
|
|
5873fa |
- slapi_entry_add_values(e, attr_changetime, vals);
|
|
|
5873fa |
+ slapi_entry_add_values(e, retrocl_changetime, vals);
|
|
|
5873fa |
slapi_ch_free((void **)&val.bv_val);
|
|
|
5873fa |
|
|
|
5873fa |
/*
|
|
|
5873fa |
@@ -344,7 +344,7 @@ write_replog_db(
|
|
|
5873fa |
/* Set the changetype attribute */
|
|
|
5873fa |
val.bv_val = "delete";
|
|
|
5873fa |
val.bv_len = 6;
|
|
|
5873fa |
- slapi_entry_add_values(e, attr_changetype, vals);
|
|
|
5873fa |
+ slapi_entry_add_values(e, retrocl_changetype, vals);
|
|
|
5873fa |
}
|
|
|
5873fa |
break;
|
|
|
5873fa |
|
|
|
5873fa |
@@ -422,7 +422,7 @@ entry2reple(Slapi_Entry *e, Slapi_Entry *oe, int optype)
|
|
|
5873fa |
} else {
|
|
|
5873fa |
return (1);
|
|
|
5873fa |
}
|
|
|
5873fa |
- slapi_entry_add_values(e, attr_changetype, vals);
|
|
|
5873fa |
+ slapi_entry_add_values(e, retrocl_changetype, vals);
|
|
|
5873fa |
|
|
|
5873fa |
estr = slapi_entry2str(oe, &len;;
|
|
|
5873fa |
p = estr;
|
|
|
5873fa |
@@ -435,7 +435,7 @@ entry2reple(Slapi_Entry *e, Slapi_Entry *oe, int optype)
|
|
|
5873fa |
}
|
|
|
5873fa |
val.bv_val = p;
|
|
|
5873fa |
val.bv_len = len - (p - estr); /* length + terminating \0 */
|
|
|
5873fa |
- slapi_entry_add_values(e, attr_changes, vals);
|
|
|
5873fa |
+ slapi_entry_add_values(e, retrocl_changes, vals);
|
|
|
5873fa |
slapi_ch_free_string(&estr);
|
|
|
5873fa |
return 0;
|
|
|
5873fa |
}
|
|
|
5873fa |
@@ -471,7 +471,7 @@ mods2reple(Slapi_Entry *e, LDAPMod **ldm)
|
|
|
5873fa |
if (NULL != l) {
|
|
|
5873fa |
val.bv_val = l->ls_buf;
|
|
|
5873fa |
val.bv_len = l->ls_len + 1; /* string + terminating \0 */
|
|
|
5873fa |
- slapi_entry_add_values(e, attr_changes, vals);
|
|
|
5873fa |
+ slapi_entry_add_values(e, retrocl_changes, vals);
|
|
|
5873fa |
lenstr_free(&l);
|
|
|
5873fa |
}
|
|
|
5873fa |
}
|
|
|
5873fa |
@@ -511,12 +511,12 @@ modrdn2reple(
|
|
|
5873fa |
|
|
|
5873fa |
val.bv_val = "modrdn";
|
|
|
5873fa |
val.bv_len = 6;
|
|
|
5873fa |
- slapi_entry_add_values(e, attr_changetype, vals);
|
|
|
5873fa |
+ slapi_entry_add_values(e, retrocl_changetype, vals);
|
|
|
5873fa |
|
|
|
5873fa |
if (newrdn) {
|
|
|
5873fa |
val.bv_val = (char *)newrdn; /* cast away const */
|
|
|
5873fa |
val.bv_len = strlen(newrdn);
|
|
|
5873fa |
- slapi_entry_add_values(e, attr_newrdn, vals);
|
|
|
5873fa |
+ slapi_entry_add_values(e, retrocl_newrdn, vals);
|
|
|
5873fa |
}
|
|
|
5873fa |
|
|
|
5873fa |
if (deloldrdn == 0) {
|
|
|
5873fa |
@@ -526,12 +526,12 @@ modrdn2reple(
|
|
|
5873fa |
val.bv_val = "TRUE";
|
|
|
5873fa |
val.bv_len = 4;
|
|
|
5873fa |
}
|
|
|
5873fa |
- slapi_entry_add_values(e, attr_deleteoldrdn, vals);
|
|
|
5873fa |
+ slapi_entry_add_values(e, retrocl_deleteoldrdn, vals);
|
|
|
5873fa |
|
|
|
5873fa |
if (newsuperior) {
|
|
|
5873fa |
val.bv_val = (char *)newsuperior; /* cast away const */
|
|
|
5873fa |
val.bv_len = strlen(newsuperior);
|
|
|
5873fa |
- slapi_entry_add_values(e, attr_newsuperior, vals);
|
|
|
5873fa |
+ slapi_entry_add_values(e, retrocl_newsuperior, vals);
|
|
|
5873fa |
}
|
|
|
5873fa |
|
|
|
5873fa |
if (NULL != ldm) {
|
|
|
5873fa |
@@ -540,7 +540,7 @@ modrdn2reple(
|
|
|
5873fa |
if (l->ls_len) {
|
|
|
5873fa |
val.bv_val = l->ls_buf;
|
|
|
5873fa |
val.bv_len = l->ls_len;
|
|
|
5873fa |
- slapi_entry_add_values(e, attr_changes, vals);
|
|
|
5873fa |
+ slapi_entry_add_values(e, retrocl_changes, vals);
|
|
|
5873fa |
}
|
|
|
5873fa |
lenstr_free(&l);
|
|
|
5873fa |
}
|
|
|
5873fa |
diff --git a/ldap/servers/plugins/retrocl/retrocl_trim.c b/ldap/servers/plugins/retrocl/retrocl_trim.c
|
|
|
5873fa |
index 0378eb7f6..d031dc3f8 100644
|
|
|
5873fa |
--- a/ldap/servers/plugins/retrocl/retrocl_trim.c
|
|
|
5873fa |
+++ b/ldap/servers/plugins/retrocl/retrocl_trim.c
|
|
|
5873fa |
@@ -49,15 +49,15 @@ static const char **
|
|
|
5873fa |
get_cleattrs(void)
|
|
|
5873fa |
{
|
|
|
5873fa |
if (cleattrs[0] == NULL) {
|
|
|
5873fa |
- cleattrs[0] = attr_objectclass;
|
|
|
5873fa |
- cleattrs[1] = attr_changenumber;
|
|
|
5873fa |
- cleattrs[2] = attr_targetdn;
|
|
|
5873fa |
- cleattrs[3] = attr_changetype;
|
|
|
5873fa |
- cleattrs[4] = attr_newrdn;
|
|
|
5873fa |
- cleattrs[5] = attr_deleteoldrdn;
|
|
|
5873fa |
- cleattrs[6] = attr_changes;
|
|
|
5873fa |
- cleattrs[7] = attr_newsuperior;
|
|
|
5873fa |
- cleattrs[8] = attr_changetime;
|
|
|
5873fa |
+ cleattrs[0] = retrocl_objectclass;
|
|
|
5873fa |
+ cleattrs[1] = retrocl_changenumber;
|
|
|
5873fa |
+ cleattrs[2] = retrocl_targetdn;
|
|
|
5873fa |
+ cleattrs[3] = retrocl_changetype;
|
|
|
5873fa |
+ cleattrs[4] = retrocl_newrdn;
|
|
|
5873fa |
+ cleattrs[5] = retrocl_deleteoldrdn;
|
|
|
5873fa |
+ cleattrs[6] = retrocl_changes;
|
|
|
5873fa |
+ cleattrs[7] = retrocl_newsuperior;
|
|
|
5873fa |
+ cleattrs[8] = retrocl_changetime;
|
|
|
5873fa |
cleattrs[9] = NULL;
|
|
|
5873fa |
}
|
|
|
5873fa |
return cleattrs;
|
|
|
5873fa |
@@ -81,7 +81,7 @@ delete_changerecord(changeNumber cnum)
|
|
|
5873fa |
char *dnbuf;
|
|
|
5873fa |
int delrc;
|
|
|
5873fa |
|
|
|
5873fa |
- dnbuf = slapi_ch_smprintf("%s=%ld, %s", attr_changenumber, cnum,
|
|
|
5873fa |
+ dnbuf = slapi_ch_smprintf("%s=%ld, %s", retrocl_changenumber, cnum,
|
|
|
5873fa |
RETROCL_CHANGELOG_DN);
|
|
|
5873fa |
pb = slapi_pblock_new();
|
|
|
5873fa |
slapi_delete_internal_set_pb(pb, dnbuf, NULL /*controls*/, NULL /* uniqueid */,
|
|
|
5873fa |
@@ -154,7 +154,7 @@ handle_getchangetime_search(Slapi_Entry *e, void *callback_data)
|
|
|
5873fa |
if (NULL != e) {
|
|
|
5873fa |
Slapi_Value *sval = NULL;
|
|
|
5873fa |
const struct berval *val = NULL;
|
|
|
5873fa |
- rc = slapi_entry_attr_find(e, attr_changetime, &attr);
|
|
|
5873fa |
+ rc = slapi_entry_attr_find(e, retrocl_changetime, &attr);
|
|
|
5873fa |
/* Bug 624442: Logic checking for lack of timestamp was
|
|
|
5873fa |
reversed. */
|
|
|
5873fa |
if (0 != rc || slapi_attr_first_value(attr, &sval) == -1 ||
|
|
|
5873fa |
@@ -174,14 +174,14 @@ handle_getchangetime_search(Slapi_Entry *e, void *callback_data)
|
|
|
5873fa |
/*
|
|
|
5873fa |
* Function: get_changetime
|
|
|
5873fa |
* Arguments: cnum - number of change record to retrieve
|
|
|
5873fa |
- * Returns: Taking the attr_changetime of the 'cnum' entry,
|
|
|
5873fa |
+ * Returns: Taking the retrocl_changetime of the 'cnum' entry,
|
|
|
5873fa |
* it converts it into time_t (parse_localTime) and returns this time value.
|
|
|
5873fa |
* It returns 0 in the following cases:
|
|
|
5873fa |
- * - changerecord entry has not attr_changetime
|
|
|
5873fa |
+ * - changerecord entry has not retrocl_changetime
|
|
|
5873fa |
* - attr_changetime attribute has no value
|
|
|
5873fa |
* - attr_changetime attribute value is empty
|
|
|
5873fa |
*
|
|
|
5873fa |
- * Description: Retrieve attr_changetime ("changetime") from a changerecord whose number is "cnum".
|
|
|
5873fa |
+ * Description: Retrieve retrocl_changetime ("changetime") from a changerecord whose number is "cnum".
|
|
|
5873fa |
*/
|
|
|
5873fa |
static time_t
|
|
|
5873fa |
get_changetime(changeNumber cnum, int *err)
|
|
|
5873fa |
@@ -198,7 +198,7 @@ get_changetime(changeNumber cnum, int *err)
|
|
|
5873fa |
}
|
|
|
5873fa |
crtp->crt_nentries = crtp->crt_err = 0;
|
|
|
5873fa |
crtp->crt_time = 0;
|
|
|
5873fa |
- PR_snprintf(fstr, sizeof(fstr), "%s=%ld", attr_changenumber, cnum);
|
|
|
5873fa |
+ PR_snprintf(fstr, sizeof(fstr), "%s=%ld", retrocl_changenumber, cnum);
|
|
|
5873fa |
|
|
|
5873fa |
pb = slapi_pblock_new();
|
|
|
5873fa |
slapi_search_internal_set_pb(pb, RETROCL_CHANGELOG_DN,
|
|
|
5873fa |
--
|
|
|
5873fa |
2.26.2
|
|
|
5873fa |
|