Branch '389-ds-base-1.3.1' - ldap/servers
by Noriko Hosoi
ldap/servers/plugins/uiduniq/7bit.c | 37 ++++++++++++++++++++++++++----------
1 file changed, 27 insertions(+), 10 deletions(-)
New commits:
commit f5ee5b8babfb7b61db7da3db7ab7c443eda58323
Author: Anupam Jain <anjain(a)localhost.localdomain>
Date: Wed Jul 10 17:18:03 2013 -0700
Ticket #47423 - 7-bit check plugin does not work for userpassword attribute
Bug description: 7-bit check plugin fails to validate userpassword
attribute
Fix description: This patch corrects the validation code for userpassword
attribute. It fetches the unhashed userpassword from the extension
instead of the entry attribute value
https://fedorahosted.org/389/ticket/47423
Reviewed by nhosoi.
(cherry picked from commit d804aaf7ee15841ac1aeaf831879fe56da23931d)
diff --git a/ldap/servers/plugins/uiduniq/7bit.c b/ldap/servers/plugins/uiduniq/7bit.c
index f690b4e..c98d660 100644
--- a/ldap/servers/plugins/uiduniq/7bit.c
+++ b/ldap/servers/plugins/uiduniq/7bit.c
@@ -218,7 +218,8 @@ preop_add(Slapi_PBlock *pb)
{
int result;
char *violated = NULL;
-
+ char *pwd = NULL;
+ char *origpwd = NULL;
#ifdef DEBUG
slapi_log_error(SLAPI_LOG_PLUGIN, plugin_name, "ADD begin\n");
#endif
@@ -236,12 +237,14 @@ preop_add(Slapi_PBlock *pb)
const char *dn;
Slapi_DN *sdn = NULL;
Slapi_Entry *e;
- Slapi_Attr *attr;
char **firstSubtree;
char **subtreeDN;
int subtreeCnt;
int is_replicated_operation;
-
+ struct berval *vals[2];
+ struct berval val;
+ vals[0] = &val;
+ vals[1] = NULL;
/*
* Get the arguments
*/
@@ -288,19 +291,26 @@ preop_add(Slapi_PBlock *pb)
for (attrName = argv; strcmp(*attrName, ",") != 0; attrName++ )
{
/*
- * if the attribute is userpassword, check unhashed#user#password
+ * if the attribute is userpassword, check unhashed user password
* instead. "userpassword" is encoded; it will always pass the 7bit
* check.
*/
- char *attr_name;
+ char *attr_name = NULL;
+ Slapi_Attr *attr = NULL;
if ( strcasecmp(*attrName, "userpassword") == 0 )
{
- attr_name = "unhashed#user#password";
+ origpwd = pwd = slapi_get_first_clear_text_pw(e);
+ if (pwd == NULL)
+ {
+ continue;
+ }
+ val.bv_val = pwd;
+ val.bv_len = strlen(val.bv_val);
} else {
attr_name = *attrName;
+ err = slapi_entry_attr_find(e, attr_name, &attr);
+ if (err) continue; /* break;*/ /* no 7-bit attribute */
}
- err = slapi_entry_attr_find(e, attr_name, &attr);
- if (err) continue; /* break;*/ /* no 7-bit attribute */
/*
* For each DN in the managed list, do 7-bit checking if
@@ -323,7 +333,14 @@ preop_add(Slapi_PBlock *pb)
/*
* Check if the value is 7-bit clean
*/
- result = bit_check(attr, NULL, &violated);
+ if(pwd)
+ {
+ result = bit_check(attr, vals, &violated);
+ if(!result)
+ pwd = NULL;
+ }
+ else
+ result = bit_check(attr, NULL, &violated);
if (result) break;
}
}
@@ -335,7 +352,7 @@ preop_add(Slapi_PBlock *pb)
if (result) {
issue_error(pb, result, "ADD", violated);
}
-
+ slapi_ch_free_string(&origpwd);
return (result==LDAP_SUCCESS)?0:-1;
}
9 years, 9 months
Branch '389-ds-base-1.2.11' - ldap/servers
by Noriko Hosoi
ldap/servers/plugins/replication/cl5_clcache.c | 11 ++++++++---
ldap/servers/plugins/replication/repl5_inc_protocol.c | 16 ++++++++--------
2 files changed, 16 insertions(+), 11 deletions(-)
New commits:
commit b4248f87124e2e3a62eb82a9b196c01b6aa41892
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Wed Jun 11 10:15:25 2014 -0700
Ticket #47809 - find a way to remove replication plugin errors messages "changelog iteration code returned a dummy entry with csn %s, skipping ..."
Description:
1) Can't locate CSN %s in the changelog (DB rc=%d).
Print the message once per one missing CSN.
2) changelog iteration code returned a dummy entry with csn %s, skipping ...
Downgrade the log level to replication log level (SLAPI_LOG_REPL).
https://fedorahosted.org/389/ticket/47809
Reviewed by rmeggins(a)redhat.com (Thanks, Rich!)
(cherry picked from commit 6a1b10db6d41be9e3aadf6f7cbb18aaf4d00e87b)
(cherry picked from commit ddca54d9d8e8d7f3f8b1cd431cbf6381361f323e)
(cherry picked from commit e50653fffab5036e2027f99f9d2b2bf70f498e2e)
diff --git a/ldap/servers/plugins/replication/cl5_clcache.c b/ldap/servers/plugins/replication/cl5_clcache.c
index d86620f..60f288e 100644
--- a/ldap/servers/plugins/replication/cl5_clcache.c
+++ b/ldap/servers/plugins/replication/cl5_clcache.c
@@ -111,6 +111,7 @@ struct clc_buffer {
DBT buf_data; /* data retrived from db */
void *buf_record_ptr; /* ptr to the current record in data */
CSN *buf_missing_csn; /* used to detect persistent missing of CSN */
+ CSN *buf_prev_missing_csn; /* used to surpress the repeated messages */
/* fields for control the CSN sequence sent to the consumer */
struct csn_seq_ctrl_block **buf_cscbs;
@@ -376,9 +377,12 @@ clcache_load_buffer ( CLC_Buffer *buf, CSN *anchorcsn, int flag )
else if ( anchorcsn ) {
/* Report error only when the missing is persistent */
if ( buf->buf_missing_csn && csn_compare (buf->buf_missing_csn, anchorcsn) == 0 ) {
- slapi_log_error ( SLAPI_LOG_FATAL, buf->buf_agmt_name,
- "Can't locate CSN %s in the changelog (DB rc=%d). The consumer may need to be reinitialized.\n",
- (char*)buf->buf_key.data, rc );
+ if (!buf->buf_prev_missing_csn || csn_compare (buf->buf_prev_missing_csn, anchorcsn)) {
+ slapi_log_error ( SLAPI_LOG_FATAL, buf->buf_agmt_name,
+ "Can't locate CSN %s in the changelog (DB rc=%d). If replication stops, the consumer may need to be reinitialized.\n",
+ (char*)buf->buf_key.data, rc );
+ csn_dup_or_init_by_csn (&buf->buf_prev_missing_csn, anchorcsn);
+ }
}
else {
csn_dup_or_init_by_csn (&buf->buf_missing_csn, anchorcsn);
@@ -915,6 +919,7 @@ clcache_delete_buffer ( CLC_Buffer **buf )
slapi_ch_free (&( (*buf)->buf_data.data ));
csn_free (&( (*buf)->buf_current_csn ));
csn_free (&( (*buf)->buf_missing_csn ));
+ csn_free (&( (*buf)->buf_prev_missing_csn ));
slapi_ch_free ( (void **) buf );
}
}
diff --git a/ldap/servers/plugins/replication/repl5_inc_protocol.c b/ldap/servers/plugins/replication/repl5_inc_protocol.c
index 6a2179a..5d3e143 100644
--- a/ldap/servers/plugins/replication/repl5_inc_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_inc_protocol.c
@@ -1694,15 +1694,15 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
switch (rc)
{
case CL5_SUCCESS:
- /* check that we don't return dummy entries */
- if (is_dummy_operation (entry.op))
- {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
- "%s: changelog iteration code returned a dummy entry with csn %s, "
- "skipping ...\n",
+ /* check that we don't return dummy entries */
+ if (is_dummy_operation (entry.op))
+ {
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "%s: changelog iteration code returned a dummy entry with csn %s, "
+ "skipping ...\n",
agmt_get_long_name(prp->agmt), csn_as_string(entry.op->csn, PR_FALSE, csn_str));
- continue;
- }
+ continue;
+ }
replay_crc = replay_update(prp, entry.op, &message_id);
if (message_id)
{
9 years, 9 months
Branch '389-ds-base-1.3.1' - ldap/servers
by Noriko Hosoi
ldap/servers/plugins/replication/cl5_clcache.c | 11 ++++++++---
ldap/servers/plugins/replication/repl5_inc_protocol.c | 16 ++++++++--------
2 files changed, 16 insertions(+), 11 deletions(-)
New commits:
commit e50653fffab5036e2027f99f9d2b2bf70f498e2e
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Wed Jun 11 10:15:25 2014 -0700
Ticket #47809 - find a way to remove replication plugin errors messages "changelog iteration code returned a dummy entry with csn %s, skipping ..."
Description:
1) Can't locate CSN %s in the changelog (DB rc=%d).
Print the message once per one missing CSN.
2) changelog iteration code returned a dummy entry with csn %s, skipping ...
Downgrade the log level to replication log level (SLAPI_LOG_REPL).
https://fedorahosted.org/389/ticket/47809
Reviewed by rmeggins(a)redhat.com (Thanks, Rich!)
(cherry picked from commit 6a1b10db6d41be9e3aadf6f7cbb18aaf4d00e87b)
(cherry picked from commit ddca54d9d8e8d7f3f8b1cd431cbf6381361f323e)
diff --git a/ldap/servers/plugins/replication/cl5_clcache.c b/ldap/servers/plugins/replication/cl5_clcache.c
index d86620f..60f288e 100644
--- a/ldap/servers/plugins/replication/cl5_clcache.c
+++ b/ldap/servers/plugins/replication/cl5_clcache.c
@@ -111,6 +111,7 @@ struct clc_buffer {
DBT buf_data; /* data retrived from db */
void *buf_record_ptr; /* ptr to the current record in data */
CSN *buf_missing_csn; /* used to detect persistent missing of CSN */
+ CSN *buf_prev_missing_csn; /* used to surpress the repeated messages */
/* fields for control the CSN sequence sent to the consumer */
struct csn_seq_ctrl_block **buf_cscbs;
@@ -376,9 +377,12 @@ clcache_load_buffer ( CLC_Buffer *buf, CSN *anchorcsn, int flag )
else if ( anchorcsn ) {
/* Report error only when the missing is persistent */
if ( buf->buf_missing_csn && csn_compare (buf->buf_missing_csn, anchorcsn) == 0 ) {
- slapi_log_error ( SLAPI_LOG_FATAL, buf->buf_agmt_name,
- "Can't locate CSN %s in the changelog (DB rc=%d). The consumer may need to be reinitialized.\n",
- (char*)buf->buf_key.data, rc );
+ if (!buf->buf_prev_missing_csn || csn_compare (buf->buf_prev_missing_csn, anchorcsn)) {
+ slapi_log_error ( SLAPI_LOG_FATAL, buf->buf_agmt_name,
+ "Can't locate CSN %s in the changelog (DB rc=%d). If replication stops, the consumer may need to be reinitialized.\n",
+ (char*)buf->buf_key.data, rc );
+ csn_dup_or_init_by_csn (&buf->buf_prev_missing_csn, anchorcsn);
+ }
}
else {
csn_dup_or_init_by_csn (&buf->buf_missing_csn, anchorcsn);
@@ -915,6 +919,7 @@ clcache_delete_buffer ( CLC_Buffer **buf )
slapi_ch_free (&( (*buf)->buf_data.data ));
csn_free (&( (*buf)->buf_current_csn ));
csn_free (&( (*buf)->buf_missing_csn ));
+ csn_free (&( (*buf)->buf_prev_missing_csn ));
slapi_ch_free ( (void **) buf );
}
}
diff --git a/ldap/servers/plugins/replication/repl5_inc_protocol.c b/ldap/servers/plugins/replication/repl5_inc_protocol.c
index 05074b0..3bb68e7 100644
--- a/ldap/servers/plugins/replication/repl5_inc_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_inc_protocol.c
@@ -1707,15 +1707,15 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
switch (rc)
{
case CL5_SUCCESS:
- /* check that we don't return dummy entries */
- if (is_dummy_operation (entry.op))
- {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
- "%s: changelog iteration code returned a dummy entry with csn %s, "
- "skipping ...\n",
+ /* check that we don't return dummy entries */
+ if (is_dummy_operation (entry.op))
+ {
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "%s: changelog iteration code returned a dummy entry with csn %s, "
+ "skipping ...\n",
agmt_get_long_name(prp->agmt), csn_as_string(entry.op->csn, PR_FALSE, csn_str));
- continue;
- }
+ continue;
+ }
replay_crc = replay_update(prp, entry.op, &message_id);
if (message_id)
{
9 years, 9 months
Branch '389-ds-base-1.3.2' - ldap/servers
by Noriko Hosoi
ldap/servers/plugins/replication/cl5_clcache.c | 11 ++++++++---
ldap/servers/plugins/replication/repl5_inc_protocol.c | 16 ++++++++--------
2 files changed, 16 insertions(+), 11 deletions(-)
New commits:
commit ddca54d9d8e8d7f3f8b1cd431cbf6381361f323e
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Wed Jun 11 10:15:25 2014 -0700
Ticket #47809 - find a way to remove replication plugin errors messages "changelog iteration code returned a dummy entry with csn %s, skipping ..."
Description:
1) Can't locate CSN %s in the changelog (DB rc=%d).
Print the message once per one missing CSN.
2) changelog iteration code returned a dummy entry with csn %s, skipping ...
Downgrade the log level to replication log level (SLAPI_LOG_REPL).
https://fedorahosted.org/389/ticket/47809
Reviewed by rmeggins(a)redhat.com (Thanks, Rich!)
(cherry picked from commit 6a1b10db6d41be9e3aadf6f7cbb18aaf4d00e87b)
diff --git a/ldap/servers/plugins/replication/cl5_clcache.c b/ldap/servers/plugins/replication/cl5_clcache.c
index d86620f..60f288e 100644
--- a/ldap/servers/plugins/replication/cl5_clcache.c
+++ b/ldap/servers/plugins/replication/cl5_clcache.c
@@ -111,6 +111,7 @@ struct clc_buffer {
DBT buf_data; /* data retrived from db */
void *buf_record_ptr; /* ptr to the current record in data */
CSN *buf_missing_csn; /* used to detect persistent missing of CSN */
+ CSN *buf_prev_missing_csn; /* used to surpress the repeated messages */
/* fields for control the CSN sequence sent to the consumer */
struct csn_seq_ctrl_block **buf_cscbs;
@@ -376,9 +377,12 @@ clcache_load_buffer ( CLC_Buffer *buf, CSN *anchorcsn, int flag )
else if ( anchorcsn ) {
/* Report error only when the missing is persistent */
if ( buf->buf_missing_csn && csn_compare (buf->buf_missing_csn, anchorcsn) == 0 ) {
- slapi_log_error ( SLAPI_LOG_FATAL, buf->buf_agmt_name,
- "Can't locate CSN %s in the changelog (DB rc=%d). The consumer may need to be reinitialized.\n",
- (char*)buf->buf_key.data, rc );
+ if (!buf->buf_prev_missing_csn || csn_compare (buf->buf_prev_missing_csn, anchorcsn)) {
+ slapi_log_error ( SLAPI_LOG_FATAL, buf->buf_agmt_name,
+ "Can't locate CSN %s in the changelog (DB rc=%d). If replication stops, the consumer may need to be reinitialized.\n",
+ (char*)buf->buf_key.data, rc );
+ csn_dup_or_init_by_csn (&buf->buf_prev_missing_csn, anchorcsn);
+ }
}
else {
csn_dup_or_init_by_csn (&buf->buf_missing_csn, anchorcsn);
@@ -915,6 +919,7 @@ clcache_delete_buffer ( CLC_Buffer **buf )
slapi_ch_free (&( (*buf)->buf_data.data ));
csn_free (&( (*buf)->buf_current_csn ));
csn_free (&( (*buf)->buf_missing_csn ));
+ csn_free (&( (*buf)->buf_prev_missing_csn ));
slapi_ch_free ( (void **) buf );
}
}
diff --git a/ldap/servers/plugins/replication/repl5_inc_protocol.c b/ldap/servers/plugins/replication/repl5_inc_protocol.c
index 05074b0..3bb68e7 100644
--- a/ldap/servers/plugins/replication/repl5_inc_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_inc_protocol.c
@@ -1707,15 +1707,15 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
switch (rc)
{
case CL5_SUCCESS:
- /* check that we don't return dummy entries */
- if (is_dummy_operation (entry.op))
- {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
- "%s: changelog iteration code returned a dummy entry with csn %s, "
- "skipping ...\n",
+ /* check that we don't return dummy entries */
+ if (is_dummy_operation (entry.op))
+ {
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "%s: changelog iteration code returned a dummy entry with csn %s, "
+ "skipping ...\n",
agmt_get_long_name(prp->agmt), csn_as_string(entry.op->csn, PR_FALSE, csn_str));
- continue;
- }
+ continue;
+ }
replay_crc = replay_update(prp, entry.op, &message_id);
if (message_id)
{
9 years, 9 months
ldap/servers
by Noriko Hosoi
ldap/servers/plugins/replication/cl5_clcache.c | 11 ++++++++---
ldap/servers/plugins/replication/repl5_inc_protocol.c | 16 ++++++++--------
2 files changed, 16 insertions(+), 11 deletions(-)
New commits:
commit 6a1b10db6d41be9e3aadf6f7cbb18aaf4d00e87b
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Wed Jun 11 10:15:25 2014 -0700
Ticket #47809 - find a way to remove replication plugin errors messages "changelog iteration code returned a dummy entry with csn %s, skipping ..."
Description:
1) Can't locate CSN %s in the changelog (DB rc=%d).
Print the message once per one missing CSN.
2) changelog iteration code returned a dummy entry with csn %s, skipping ...
Downgrade the log level to replication log level (SLAPI_LOG_REPL).
https://fedorahosted.org/389/ticket/47809
Reviewed by rmeggins(a)redhat.com (Thanks, Rich!)
diff --git a/ldap/servers/plugins/replication/cl5_clcache.c b/ldap/servers/plugins/replication/cl5_clcache.c
index d86620f..60f288e 100644
--- a/ldap/servers/plugins/replication/cl5_clcache.c
+++ b/ldap/servers/plugins/replication/cl5_clcache.c
@@ -111,6 +111,7 @@ struct clc_buffer {
DBT buf_data; /* data retrived from db */
void *buf_record_ptr; /* ptr to the current record in data */
CSN *buf_missing_csn; /* used to detect persistent missing of CSN */
+ CSN *buf_prev_missing_csn; /* used to surpress the repeated messages */
/* fields for control the CSN sequence sent to the consumer */
struct csn_seq_ctrl_block **buf_cscbs;
@@ -376,9 +377,12 @@ clcache_load_buffer ( CLC_Buffer *buf, CSN *anchorcsn, int flag )
else if ( anchorcsn ) {
/* Report error only when the missing is persistent */
if ( buf->buf_missing_csn && csn_compare (buf->buf_missing_csn, anchorcsn) == 0 ) {
- slapi_log_error ( SLAPI_LOG_FATAL, buf->buf_agmt_name,
- "Can't locate CSN %s in the changelog (DB rc=%d). The consumer may need to be reinitialized.\n",
- (char*)buf->buf_key.data, rc );
+ if (!buf->buf_prev_missing_csn || csn_compare (buf->buf_prev_missing_csn, anchorcsn)) {
+ slapi_log_error ( SLAPI_LOG_FATAL, buf->buf_agmt_name,
+ "Can't locate CSN %s in the changelog (DB rc=%d). If replication stops, the consumer may need to be reinitialized.\n",
+ (char*)buf->buf_key.data, rc );
+ csn_dup_or_init_by_csn (&buf->buf_prev_missing_csn, anchorcsn);
+ }
}
else {
csn_dup_or_init_by_csn (&buf->buf_missing_csn, anchorcsn);
@@ -915,6 +919,7 @@ clcache_delete_buffer ( CLC_Buffer **buf )
slapi_ch_free (&( (*buf)->buf_data.data ));
csn_free (&( (*buf)->buf_current_csn ));
csn_free (&( (*buf)->buf_missing_csn ));
+ csn_free (&( (*buf)->buf_prev_missing_csn ));
slapi_ch_free ( (void **) buf );
}
}
diff --git a/ldap/servers/plugins/replication/repl5_inc_protocol.c b/ldap/servers/plugins/replication/repl5_inc_protocol.c
index 05074b0..3bb68e7 100644
--- a/ldap/servers/plugins/replication/repl5_inc_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_inc_protocol.c
@@ -1707,15 +1707,15 @@ send_updates(Private_Repl_Protocol *prp, RUV *remote_update_vector, PRUint32 *nu
switch (rc)
{
case CL5_SUCCESS:
- /* check that we don't return dummy entries */
- if (is_dummy_operation (entry.op))
- {
- slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
- "%s: changelog iteration code returned a dummy entry with csn %s, "
- "skipping ...\n",
+ /* check that we don't return dummy entries */
+ if (is_dummy_operation (entry.op))
+ {
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
+ "%s: changelog iteration code returned a dummy entry with csn %s, "
+ "skipping ...\n",
agmt_get_long_name(prp->agmt), csn_as_string(entry.op->csn, PR_FALSE, csn_str));
- continue;
- }
+ continue;
+ }
replay_crc = replay_update(prp, entry.op, &message_id);
if (message_id)
{
9 years, 9 months
Branch '389-ds-base-1.3.2' - ldap/servers
by Ludwig Krispenz
ldap/servers/plugins/acl/acl_ext.c | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 3e5c14a405cc48e7be3f6072bff44bc5cc2655ca
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
Date: Tue Feb 18 11:40:16 2014 +0100
Ticket 47704 - invalid sizelimits in aci group evaluation
Bug Description: aci group evaluation fails because of sizelimit exceeded
but it is exceeded because it is -1476887876 or another
negative integer becasue operation parameter are a union
based on operation types and so for otehr than search
the value is dependent on the operation params
Fix Description: treat any negative integer like -1 (unlimited). A better fix
would be to introduce a specific configuration param or
to abondon the limit in group evaluation at all. But this
could introduce backward compatibility problems and
will be handled in ticket 47703 for newer versions
https://fedorahosted.org/389/ticket/47704
Reviewed by: Rich, thanks
diff --git a/ldap/servers/plugins/acl/acl_ext.c b/ldap/servers/plugins/acl/acl_ext.c
index 608de0a..f67bb96 100644
--- a/ldap/servers/plugins/acl/acl_ext.c
+++ b/ldap/servers/plugins/acl/acl_ext.c
@@ -847,6 +847,12 @@ acl_init_aclpb ( Slapi_PBlock *pb, Acl_PBlock *aclpb, const char *ndn, int copy_
slapi_pblock_get( pb, SLAPI_SEARCH_SIZELIMIT, &aclpb->aclpb_max_member_sizelimit );
if ( aclpb->aclpb_max_member_sizelimit == 0 ) {
aclpb->aclpb_max_member_sizelimit = SLAPD_DEFAULT_LOOKTHROUGHLIMIT;
+ } else if ( aclpb->aclpb_max_member_sizelimit < -1 ) {
+ /* handle the case of a negtive size limit either set or due
+ * to bug bz1065971. The member size limit should be dropped,
+ * but for backward compatibility to the best we can
+ */
+ aclpb->aclpb_max_member_sizelimit = -1;
}
slapi_pblock_get( pb, SLAPI_OPERATION_TYPE, &aclpb->aclpb_optype );
9 years, 9 months
Branch '389-ds-base-1.2.11' - ldap/servers
by Mark Reynolds
ldap/servers/plugins/mep/mep.c | 1 -
1 file changed, 1 deletion(-)
New commits:
commit cb8471beba73926505151b388b0573872406a96f
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Jun 10 14:59:10 2014 -0400
Ticket 47813 - remove "goto bail" from previous commit
https://fedorahosted.org/389/ticket/47813
(cherry picked from commit 4cdd7fd6ad41ff5d92dfd452b6a7bef25462b643)
diff --git a/ldap/servers/plugins/mep/mep.c b/ldap/servers/plugins/mep/mep.c
index dfff42b..70634c0 100644
--- a/ldap/servers/plugins/mep/mep.c
+++ b/ldap/servers/plugins/mep/mep.c
@@ -1492,7 +1492,6 @@ mep_add_managed_entry(struct configEntry *config,
"mep_add_managed_entry: Failed to add managed entry "
"objectclass in origin entry \"%s\", error (%s)\n",
slapi_entry_get_dn(origin), ldap_err2string(result));
- goto bail;
}
slapi_pblock_init(mod_pb);
9 years, 9 months
Branch '389-ds-base-1.3.1' - ldap/servers
by Mark Reynolds
ldap/servers/plugins/mep/mep.c | 1 -
1 file changed, 1 deletion(-)
New commits:
commit cc38a66854db8212ff3928f234ea9eecd57e0ce9
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Jun 10 14:59:10 2014 -0400
Ticket 47813 - remove "goto bail" from previous commit
https://fedorahosted.org/389/ticket/47813
(cherry picked from commit 4cdd7fd6ad41ff5d92dfd452b6a7bef25462b643)
diff --git a/ldap/servers/plugins/mep/mep.c b/ldap/servers/plugins/mep/mep.c
index 57fadd8..4c9924c 100644
--- a/ldap/servers/plugins/mep/mep.c
+++ b/ldap/servers/plugins/mep/mep.c
@@ -1492,7 +1492,6 @@ mep_add_managed_entry(struct configEntry *config,
"mep_add_managed_entry: Failed to add managed entry "
"objectclass in origin entry \"%s\", error (%s)\n",
slapi_entry_get_dn(origin), ldap_err2string(result));
- goto bail;
}
slapi_pblock_init(mod_pb);
9 years, 9 months
Branch '389-ds-base-1.3.2' - ldap/servers
by Mark Reynolds
ldap/servers/plugins/mep/mep.c | 1 -
1 file changed, 1 deletion(-)
New commits:
commit 4cdd7fd6ad41ff5d92dfd452b6a7bef25462b643
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Jun 10 14:59:10 2014 -0400
Ticket 47813 - remove "goto bail" from previous commit
https://fedorahosted.org/389/ticket/47813
diff --git a/ldap/servers/plugins/mep/mep.c b/ldap/servers/plugins/mep/mep.c
index ffd6667..5a38042 100644
--- a/ldap/servers/plugins/mep/mep.c
+++ b/ldap/servers/plugins/mep/mep.c
@@ -1492,7 +1492,6 @@ mep_add_managed_entry(struct configEntry *config,
"mep_add_managed_entry: Failed to add managed entry "
"objectclass in origin entry \"%s\", error (%s)\n",
slapi_entry_get_dn(origin), ldap_err2string(result));
- goto bail;
}
slapi_pblock_init(mod_pb);
9 years, 9 months
Branch '389-ds-base-1.2.11' - ldap/servers
by Mark Reynolds
ldap/servers/plugins/mep/mep.c | 41 ++++++++++++++++++++++++++++++-----------
1 file changed, 30 insertions(+), 11 deletions(-)
New commits:
commit 7a3fd98b0a0cd17736b1662a9bbcbfdd75eddb7b
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Mon Jun 9 12:27:04 2014 -0400
Ticket 47813 - managed entry plugin fails to update member
pointer on modrdn operation
Bug Description: A modrdn on an existing managed entry failed to update
the entry pointer becuase part of the update is to add
the managed entry objectclass - which already exists
in the managed entry. This caused the new pointer value
to not be added to the managed entry.
Fix Description: During a modrdn operation perform the objectclass addition
in a separate operation, as we don't know if the entry
already has the objectclass or not.
https://fedorahosted.org/389/ticket/47813
TET: passed
Jenkins: passed
Reviewed by: rmeggins(Thanks!)
(cherry picked from commit 0fe78df27bea0ed29f5f74266bc530832e0d8906)
diff --git a/ldap/servers/plugins/mep/mep.c b/ldap/servers/plugins/mep/mep.c
index d81ecf4..dfff42b 100644
--- a/ldap/servers/plugins/mep/mep.c
+++ b/ldap/servers/plugins/mep/mep.c
@@ -1462,38 +1462,57 @@ mep_add_managed_entry(struct configEntry *config,
/* Add forward link to origin entry. */
LDAPMod oc_mod;
LDAPMod pointer_mod;
- LDAPMod *mods[3];
+ LDAPMod *mods[2];
char *oc_vals[2];
char *pointer_vals[2];
/* Clear out the pblock for reuse. */
slapi_pblock_init(mod_pb);
- /* Add the origin entry objectclass. */
+ /*
+ * Add the origin entry objectclass. Do not check the result
+ * as we could be here because of a modrdn operation - in which
+ * case the objectclass already exists.
+ */
oc_vals[0] = MEP_ORIGIN_OC;
oc_vals[1] = 0;
oc_mod.mod_op = LDAP_MOD_ADD;
oc_mod.mod_type = SLAPI_ATTR_OBJECTCLASS;
oc_mod.mod_values = oc_vals;
+ mods[0] = &oc_mod;
+ mods[1] = NULL;
- /* Add a pointer to the managed entry. */
+ /* add the objectclass */
+ slapi_modify_internal_set_pb_ext(mod_pb, slapi_entry_get_sdn(origin),
+ mods, 0, 0, mep_get_plugin_id(), 0);
+ slapi_modify_internal_pb(mod_pb);
+ slapi_pblock_get(mod_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
+ if (result != LDAP_SUCCESS && result != LDAP_TYPE_OR_VALUE_EXISTS){
+ slapi_log_error(SLAPI_LOG_FATAL, MEP_PLUGIN_SUBSYSTEM,
+ "mep_add_managed_entry: Failed to add managed entry "
+ "objectclass in origin entry \"%s\", error (%s)\n",
+ slapi_entry_get_dn(origin), ldap_err2string(result));
+ goto bail;
+ }
+ slapi_pblock_init(mod_pb);
+
+ /*
+ * Now, add a pointer to the managed entry.
+ */
pointer_vals[0] = managed_dn;
pointer_vals[1] = 0;
pointer_mod.mod_op = LDAP_MOD_ADD;
pointer_mod.mod_type = MEP_MANAGED_ENTRY_TYPE;
pointer_mod.mod_values = pointer_vals;
+ mods[0] = &pointer_mod;
+ mods[1] = NULL;
- mods[0] = &oc_mod;
- mods[1] = &pointer_mod;
- mods[2] = 0;
-
- /* Perform the modify operation. */
slapi_log_error(SLAPI_LOG_PLUGIN, MEP_PLUGIN_SUBSYSTEM,
"Adding %s pointer to \"%s\" in entry \"%s\"\n.",
MEP_MANAGED_ENTRY_TYPE, managed_dn, slapi_entry_get_dn(origin));
- slapi_modify_internal_set_pb_ext(mod_pb,
- slapi_entry_get_sdn(origin),
- mods, 0, 0, mep_get_plugin_id(), 0);
+
+ slapi_modify_internal_set_pb_ext(mod_pb, slapi_entry_get_sdn(origin),
+ mods, 0, 0, mep_get_plugin_id(), 0);
slapi_modify_internal_pb(mod_pb);
slapi_pblock_get(mod_pb, SLAPI_PLUGIN_INTOP_RESULT, &result);
9 years, 9 months