Branch '389-ds-base-1.3.3' - ldap/servers
by Noriko Hosoi
ldap/servers/slapd/back-ldbm/ldbm_modify.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 17294432e95bdb30c6816cefa7be5035df818a43
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Tue Oct 7 12:12:28 2014 -0700
Ticket #47919 - ldbm_back_modify SLAPI_PLUGIN_BE_PRE_MODIFY_FN does not return even if one of the preop plugins fails.
Bug Description: In ldbm_back_modify, if one of the be_preop plugins
called at SLAPI_PLUGIN_BE_PRE_MODIFY_FN fail, ldbm_back_modify does
not return there but go to the real modify operation.
Fix Description: If an error is returned from be_preop plugins in
ldbm_back_modify, it returns the error there and does not proceed
the modify operation.
https://fedorahosted.org/389/ticket/47919
Reviewed by mreynolds(a)redhat.com (Thank you, Mark!!)
(cherry picked from commit cb173814ec579fafbfef515738c16a986a9749cd)
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modify.c b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
index 529bd32..d15b050 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modify.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
@@ -641,11 +641,11 @@ ldbm_back_modify( Slapi_PBlock *pb )
if (SLAPI_PLUGIN_NOOP == opreturn) {
not_an_error = 1;
rc = opreturn = LDAP_SUCCESS;
- goto error_return;
} else if (!opreturn) {
- opreturn = -1;
+ opreturn = SLAPI_PLUGIN_FAILURE;
slapi_pblock_set(pb, SLAPI_PLUGIN_OPRETURN, &opreturn);
}
+ goto error_return;
}
/* The Plugin may have messed about with some of the PBlock parameters... ie. mods */
slapi_pblock_get( pb, SLAPI_MODIFY_MODS, &mods );
9 years, 6 months
ldap/servers
by Noriko Hosoi
ldap/servers/slapd/back-ldbm/ldbm_modify.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit cb173814ec579fafbfef515738c16a986a9749cd
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Tue Oct 7 12:12:28 2014 -0700
Ticket #47919 - ldbm_back_modify SLAPI_PLUGIN_BE_PRE_MODIFY_FN does not return even if one of the preop plugins fails.
Bug Description: In ldbm_back_modify, if one of the be_preop plugins
called at SLAPI_PLUGIN_BE_PRE_MODIFY_FN fail, ldbm_back_modify does
not return there but go to the real modify operation.
Fix Description: If an error is returned from be_preop plugins in
ldbm_back_modify, it returns the error there and does not proceed
the modify operation.
https://fedorahosted.org/389/ticket/47919
Reviewed by mreynolds(a)redhat.com (Thank you, Mark!!)
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modify.c b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
index 529bd32..d15b050 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_modify.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
@@ -641,11 +641,11 @@ ldbm_back_modify( Slapi_PBlock *pb )
if (SLAPI_PLUGIN_NOOP == opreturn) {
not_an_error = 1;
rc = opreturn = LDAP_SUCCESS;
- goto error_return;
} else if (!opreturn) {
- opreturn = -1;
+ opreturn = SLAPI_PLUGIN_FAILURE;
slapi_pblock_set(pb, SLAPI_PLUGIN_OPRETURN, &opreturn);
}
+ goto error_return;
}
/* The Plugin may have messed about with some of the PBlock parameters... ie. mods */
slapi_pblock_get( pb, SLAPI_MODIFY_MODS, &mods );
9 years, 6 months
Branch '389-ds-base-1.3.3' - lib/base
by Mark Reynolds
lib/base/system.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 0f29b5e920088ab4d32f5afdc7dcb076a88c5eae
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Oct 7 15:38:34 2014 -0400
Ticket 47892 - Fix remaining compiler warnings
Description: Fix the remaining compiler warnings from ds/lib/base/system.cpp
https://fedorahosted.org/389/ticket/47892
Reviewed by: nhosoi(Thanks!)
(cherry picked from commit 5f3aaa2872d69c5900eaf52d7e9fc2f1bcea475e)
diff --git a/lib/base/system.cpp b/lib/base/system.cpp
index 287d5a8..c4cbfd0 100644
--- a/lib/base/system.cpp
+++ b/lib/base/system.cpp
@@ -201,7 +201,7 @@ NSAPI_PUBLIC void *system_realloc_perm(void *ptr, int size)
return ptr;
}
} else {
- ereport(LOG_WARN, "realloc: attempt to realloc to smaller size");
+ ereport(LOG_WARN, const_cast<char *>("realloc: attempt to realloc to smaller size"));
return realloc(ptr, size);
}
@@ -228,20 +228,20 @@ NSAPI_PUBLIC void system_free_perm(void *ptr)
cptr += sizeof(int);
for (index=0; index<DEBUG_MARGIN; index++)
if (cptr[index] != DEBUG_MARGIN_CHAR) {
- ereport(LOG_CATASTROPHE, "free: corrupt memory (prebounds overwrite)");
+ ereport(LOG_CATASTROPHE, const_cast<char *>("free: corrupt memory (prebounds overwrite)"));
break;
}
cptr += DEBUG_MARGIN + *length;
for (index=0; index<DEBUG_MARGIN; index++)
if (cptr[index] != DEBUG_MARGIN_CHAR) {
- ereport(LOG_CATASTROPHE, "free: corrupt memory (prebounds overwrite)");
+ ereport(LOG_CATASTROPHE, const_cast<char *>("free: corrupt memory (prebounds overwrite)"));
break;
}
memset(baseptr, DEBUG_FREE_CHAR, *length + 2*DEBUG_MARGIN+sizeof(int));
} else {
- ereport(LOG_CATASTROPHE, "free: freeing unallocated memory");
+ ereport(LOG_CATASTROPHE, const_cast<char *>("free: freeing unallocated memory"));
}
free(baseptr);
#else
9 years, 6 months
lib/base
by Mark Reynolds
lib/base/system.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 5f3aaa2872d69c5900eaf52d7e9fc2f1bcea475e
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Oct 7 15:38:34 2014 -0400
Ticket 47892 - Fix remaining compiler warnings
Description: Fix the remaining compiler warnings from ds/lib/base/system.cpp
https://fedorahosted.org/389/ticket/47892
Reviewed by: nhosoi(Thanks!)
diff --git a/lib/base/system.cpp b/lib/base/system.cpp
index 287d5a8..c4cbfd0 100644
--- a/lib/base/system.cpp
+++ b/lib/base/system.cpp
@@ -201,7 +201,7 @@ NSAPI_PUBLIC void *system_realloc_perm(void *ptr, int size)
return ptr;
}
} else {
- ereport(LOG_WARN, "realloc: attempt to realloc to smaller size");
+ ereport(LOG_WARN, const_cast<char *>("realloc: attempt to realloc to smaller size"));
return realloc(ptr, size);
}
@@ -228,20 +228,20 @@ NSAPI_PUBLIC void system_free_perm(void *ptr)
cptr += sizeof(int);
for (index=0; index<DEBUG_MARGIN; index++)
if (cptr[index] != DEBUG_MARGIN_CHAR) {
- ereport(LOG_CATASTROPHE, "free: corrupt memory (prebounds overwrite)");
+ ereport(LOG_CATASTROPHE, const_cast<char *>("free: corrupt memory (prebounds overwrite)"));
break;
}
cptr += DEBUG_MARGIN + *length;
for (index=0; index<DEBUG_MARGIN; index++)
if (cptr[index] != DEBUG_MARGIN_CHAR) {
- ereport(LOG_CATASTROPHE, "free: corrupt memory (prebounds overwrite)");
+ ereport(LOG_CATASTROPHE, const_cast<char *>("free: corrupt memory (prebounds overwrite)"));
break;
}
memset(baseptr, DEBUG_FREE_CHAR, *length + 2*DEBUG_MARGIN+sizeof(int));
} else {
- ereport(LOG_CATASTROPHE, "free: freeing unallocated memory");
+ ereport(LOG_CATASTROPHE, const_cast<char *>("free: freeing unallocated memory"));
}
free(baseptr);
#else
9 years, 6 months
Branch '389-ds-base-1.2.11' - ldap/servers
by Mark Reynolds
ldap/servers/slapd/add.c | 10 ++++++----
ldap/servers/slapd/pw.c | 5 -----
2 files changed, 6 insertions(+), 9 deletions(-)
New commits:
commit 851240569e1759589e1d40ad3caf3da5726e263b
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Oct 7 14:24:17 2014 -0400
Ticket 47900 - Fix backport issue to 1.2.11
Bug Description: The backport to 1.2.11 was incorrect, and caused valid adds to
to fail, but not return an error.
Fix Description: Fix login when checking for password admins and password syntax.
https://fedorahosted.org/389/ticket/47900
Reviewed by: nhosoi(Thanks!)
diff --git a/ldap/servers/slapd/add.c b/ldap/servers/slapd/add.c
index 9b549c3..5b3b5ee 100644
--- a/ldap/servers/slapd/add.c
+++ b/ldap/servers/slapd/add.c
@@ -562,7 +562,12 @@ static void op_shared_add (Slapi_PBlock *pb)
/* check password syntax */
if (!pw_is_pwp_admin(pb, pwpolicy) &&
- check_pw_syntax(pb, slapi_entry_get_sdn_const(e), present_values, NULL, e, 0) == 0)
+ check_pw_syntax(pb, slapi_entry_get_sdn_const(e), present_values, NULL, e, 0) != 0)
+ {
+ /* error result is sent from check_pw_syntax */
+ goto done;
+ }
+ else
{
Slapi_Value **vals= NULL;
valuearray_add_valuearray(&unhashed_password_vals, present_values, 0);
@@ -575,9 +580,6 @@ static void op_shared_add (Slapi_PBlock *pb)
/* Add the unhashed password pseudo-attribute to the entry */
pwdtype = slapi_attr_syntax_normalize(PSEUDO_ATTR_UNHASHEDUSERPASSWORD);
slapi_entry_add_values_sv(e, pwdtype, unhashed_password_vals);
- } else {
- /* error result is sent from check_pw_syntax */
- goto done;
}
}
diff --git a/ldap/servers/slapd/pw.c b/ldap/servers/slapd/pw.c
index 94fc08e..c88abc4 100644
--- a/ldap/servers/slapd/pw.c
+++ b/ldap/servers/slapd/pw.c
@@ -1643,11 +1643,6 @@ new_passwdPolicy(Slapi_PBlock *pb, const char *dn)
slapdFrontendConfig_t *slapdFrontendConfig;
int optype = -1;
- /* If we already allocated a pw policy, return it */
- if(pb && pb->pwdpolicy){
- return pb->pwdpolicy;
- }
-
if (g_get_active_threadcnt() == 0){
/*
* If the server is starting up the thread count will be zero, so
9 years, 6 months
Branch '389-ds-base-1.3.3' - ldap/servers
by Ludwig Krispenz
ldap/servers/slapd/plugin.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 8683000073fef6e2d98792c09956142c52fcb184
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
Date: Thu Oct 2 12:40:21 2014 +0200
ticket 47916 plugin logging parameter only triggers result logging
Fix: evaluate global plugin logging param, when setting logging flag for plugins
Reviewed by: Noriko, Thanks
https://fedorahosted.org/389/ticket/47916
diff --git a/ldap/servers/slapd/plugin.c b/ldap/servers/slapd/plugin.c
index dde3ce5..25a8553 100644
--- a/ldap/servers/slapd/plugin.c
+++ b/ldap/servers/slapd/plugin.c
@@ -3810,7 +3810,7 @@ int plugin_build_operation_action_bitmap (int input_actions, const struct slapdp
if (plugin == NULL)
plugin = &global_default_plg;
- if (plugin->plg_conf.plgc_log_access)
+ if (plugin->plg_conf.plgc_log_access || config_get_plugin_logging())
result_actions |= OP_FLAG_ACTION_LOG_ACCESS;
if (plugin->plg_conf.plgc_log_audit)
9 years, 6 months
ldap/servers
by Ludwig Krispenz
ldap/servers/slapd/plugin.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 82d9a1bd4c9deffa1247c45f7551a96b741e45b4
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
Date: Thu Oct 2 12:40:21 2014 +0200
ticket 47916 plugin logging parameter only triggers result logging
Fix: evaluate global plugin logging param, when setting logging flag for plugins
Reviewed by: Noriko, Thanks
https://fedorahosted.org/389/ticket/47916
diff --git a/ldap/servers/slapd/plugin.c b/ldap/servers/slapd/plugin.c
index dde3ce5..25a8553 100644
--- a/ldap/servers/slapd/plugin.c
+++ b/ldap/servers/slapd/plugin.c
@@ -3810,7 +3810,7 @@ int plugin_build_operation_action_bitmap (int input_actions, const struct slapdp
if (plugin == NULL)
plugin = &global_default_plg;
- if (plugin->plg_conf.plgc_log_access)
+ if (plugin->plg_conf.plgc_log_access || config_get_plugin_logging())
result_actions |= OP_FLAG_ACTION_LOG_ACCESS;
if (plugin->plg_conf.plgc_log_audit)
9 years, 6 months
Branch '389-ds-base-1.3.1' - ldap/servers
by Ludwig Krispenz
ldap/servers/plugins/dna/dna.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit c26a7b162423b79111d184d76e6b11b2b2082dc6
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
Date: Mon Oct 6 17:12:42 2014 +0200
Ticket 47918 - result of dna_dn_is_shared_config is incorrectly used
Bug Description: dna_load_shared_servers() is called for all entries,
except the config entries
Fix Description: revert the logic of the result of dna_dn_is_shared_config()
https://fedorahosted.org/389/ticket/47918
Reviewed by: Mark, Thanks
diff --git a/ldap/servers/plugins/dna/dna.c b/ldap/servers/plugins/dna/dna.c
index 6c1a954..dfb140f 100644
--- a/ldap/servers/plugins/dna/dna.c
+++ b/ldap/servers/plugins/dna/dna.c
@@ -4198,7 +4198,7 @@ static int dna_config_check_post_op(Slapi_PBlock * pb)
if (dna_dn_is_config(dn)) {
dna_load_plugin_config(pb, 0);
}
- if(dna_dn_is_shared_config(pb, dn) == 0){
+ if(dna_dn_is_shared_config(pb, dn)){
dna_load_shared_servers();
}
}
9 years, 6 months
Branch '389-ds-base-1.3.2' - ldap/servers
by Ludwig Krispenz
ldap/servers/plugins/dna/dna.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit b2e24bb620064c839812ea194dbdd15e9a3bd5f7
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
Date: Mon Oct 6 17:12:42 2014 +0200
Ticket 47918 - result of dna_dn_is_shared_config is incorrectly used
Bug Description: dna_load_shared_servers() is called for all entries,
except the config entries
Fix Description: revert the logic of the result of dna_dn_is_shared_config()
https://fedorahosted.org/389/ticket/47918
Reviewed by: Mark, Thanks
diff --git a/ldap/servers/plugins/dna/dna.c b/ldap/servers/plugins/dna/dna.c
index d427dd3..078b35c 100644
--- a/ldap/servers/plugins/dna/dna.c
+++ b/ldap/servers/plugins/dna/dna.c
@@ -4202,7 +4202,7 @@ static int dna_config_check_post_op(Slapi_PBlock * pb)
if (dna_dn_is_config(dn)) {
dna_load_plugin_config(pb, 0);
}
- if(dna_dn_is_shared_config(pb, dn) == 0){
+ if(dna_dn_is_shared_config(pb, dn)){
dna_load_shared_servers();
}
}
9 years, 6 months
Branch '389-ds-base-1.3.3' - ldap/servers
by Ludwig Krispenz
ldap/servers/plugins/dna/dna.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 8d9679194c945a6e0b06f6527fba6b4548d4844d
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
Date: Mon Oct 6 17:12:42 2014 +0200
Ticket 47918 - result of dna_dn_is_shared_config is incorrectly used
Bug Description: dna_load_shared_servers() is called for all entries,
except the config entries
Fix Description: revert the logic of the result of dna_dn_is_shared_config()
https://fedorahosted.org/389/ticket/47918
Reviewed by: Mark, Thanks
diff --git a/ldap/servers/plugins/dna/dna.c b/ldap/servers/plugins/dna/dna.c
index b42150a..bc280a4 100644
--- a/ldap/servers/plugins/dna/dna.c
+++ b/ldap/servers/plugins/dna/dna.c
@@ -4163,7 +4163,7 @@ static int dna_config_check_post_op(Slapi_PBlock * pb)
if (dna_dn_is_config(dn)) {
dna_load_plugin_config(pb, 0);
}
- if(dna_dn_is_shared_config(pb, dn) == 0){
+ if(dna_dn_is_shared_config(pb, dn)){
dna_load_shared_servers();
}
}
9 years, 6 months