ldap/servers/plugins/acctpolicy/acct_util.c | 4 ++++
ldap/servers/plugins/acctpolicy/acctpolicy.h | 4 ----
ldap/servers/plugins/acl/aclutil.c | 1 -
ldap/servers/plugins/posix-winsync/posix-group-task.c | 2 ++
ldap/servers/plugins/replication/repl5_plugins.c | 18 +++++++++---------
ldap/servers/slapd/attr.c | 3 +--
6 files changed, 16 insertions(+), 16 deletions(-)
New commits:
commit dc9192efc1c502e53e54291a8afda33f56a97d03
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Wed Jul 31 10:52:21 2013 -0600
fix coverity 11915 - dead code - introduced with fix for ticket 346
just get rid of unused variable was_present_null
reviewed by: nhosoi (Thanks!)
(cherry picked from commit ba70aac1991a04455ba83362e22c33f7f6ab227a)
(cherry picked from commit fcf4154b73681752a5ac32954a1d25771a75478e)
(cherry picked from commit 67694e7a95f72067bba84e0f6af4ff1c4af89a9e)
diff --git a/ldap/servers/slapd/attr.c b/ldap/servers/slapd/attr.c
index 0dd0393..8d8cf21 100644
--- a/ldap/servers/slapd/attr.c
+++ b/ldap/servers/slapd/attr.c
@@ -795,7 +795,6 @@ attr_add_valuearray(Slapi_Attr *a, Slapi_Value **vals, const char
*dn)
int i = 0;
int numofvals = 0;
int duplicate_index = -1;
- int was_present_null = 0;
int rc = LDAP_SUCCESS;
if (valuearray_isempty(vals)) {
@@ -894,7 +893,7 @@ attr_add_valuearray(Slapi_Attr *a, Slapi_Value **vals, const char
*dn)
duplicate_string,
a->a_type,
dn ? dn : "<null>",
- (was_present_null ? "duplicate new value" : "value
exists"));
+ "value exists");
}
return( rc );
}
commit 89a98eb66264718e3d7431a4cda92afe08371a84
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Wed Jul 31 10:49:18 2013 -0600
fix coverity 11895 - null deref - caused by fix to ticket 47392
reviewed by: nhosoi (Thanks!)
(cherry picked from commit b61143cc79cb5c3e23f403c4980f8a03ab7426c0)
(cherry picked from commit 03a67b1432bbafe5eb7a82a8afd0832f220c229b)
(cherry picked from commit 877fee5b6228faf471eefed9a073dff13074b224)
diff --git a/ldap/servers/plugins/replication/repl5_plugins.c
b/ldap/servers/plugins/replication/repl5_plugins.c
index 7aa2e2c..afb0364 100644
--- a/ldap/servers/plugins/replication/repl5_plugins.c
+++ b/ldap/servers/plugins/replication/repl5_plugins.c
@@ -1117,9 +1117,13 @@ write_changelog_and_ruv (Slapi_PBlock *pb)
just read from the changelog in either the supplier or consumer ruv
*/
if (0 == return_value) {
- char csn_str[CSN_STRSIZE];
+ char csn_str[CSN_STRSIZE] = {'\0'};
CSN *opcsn;
int rc;
+ const char *dn = op_params ? REPL_GET_DN(&op_params->target_address) :
"unknown";
+ char *uniqueid = op_params ? op_params->target_address.uniqueid :
"unknown";
+ unsigned long optype = op_params ? op_params->operation_type : 0;
+ CSN *oppcsn = op_params ? op_params->csn : NULL;
slapi_pblock_get( pb, SLAPI_OPERATION, &op );
opcsn = operation_get_csn(op);
@@ -1128,18 +1132,14 @@ write_changelog_and_ruv (Slapi_PBlock *pb)
slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
"write_changelog_and_ruv: RUV already covers csn for "
"%s (uniqid: %s, optype: %lu) csn %s\n",
- REPL_GET_DN(&op_params->target_address),
- op_params->target_address.uniqueid,
- op_params->operation_type,
- csn_as_string(op_params->csn, PR_FALSE, csn_str));
+ dn, uniqueid, optype,
+ csn_as_string(oppcsn, PR_FALSE, csn_str));
} else if (rc != RUV_SUCCESS) {
slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
"write_changelog_and_ruv: failed to update RUV for "
"%s (uniqid: %s, optype: %lu) to changelog csn %s\n",
- REPL_GET_DN(&op_params->target_address),
- op_params->target_address.uniqueid,
- op_params->operation_type,
- csn_as_string(op_params->csn, PR_FALSE, csn_str));
+ dn, uniqueid, optype,
+ csn_as_string(oppcsn, PR_FALSE, csn_str));
}
}
commit 9750ea73014b36349040e166a469ed09236c2549
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Wed Jul 31 09:53:52 2013 -0600
fix compiler warning in posix winsync code for posix_group_del_memberuid_callback
(cherry picked from commit f440e039a5f2a7b2ea0dd087d8e91c554abc1be0)
(cherry picked from commit 761d9d550ca1025293dc1607760adea38ddc5452)
diff --git a/ldap/servers/plugins/posix-winsync/posix-group-task.c
b/ldap/servers/plugins/posix-winsync/posix-group-task.c
index 1d9135d..05c43af 100644
--- a/ldap/servers/plugins/posix-winsync/posix-group-task.c
+++ b/ldap/servers/plugins/posix-winsync/posix-group-task.c
@@ -174,6 +174,7 @@ posix_group_task_destructor(Slapi_Task *task)
}
}
+#ifdef USE_POSIX_GROUP_DEL_MEMBERUID
static int
posix_group_del_memberuid_callback(Slapi_Entry *e, void *callback_data)
{
@@ -208,6 +209,7 @@ posix_group_del_memberuid_callback(Slapi_Entry *e, void
*callback_data)
return rc;
}
+#endif
static int
posix_group_fix_memberuid(char *dn, char *filter_str, void *txn)
commit 12d47a25879456f8527505ded5a001f68302a877
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Wed Jul 31 09:53:03 2013 -0600
Fix compiler warnings for Ticket 47395 and 47397
Ticket 47395 47397 v2 correct behaviour of account policy if only stateattr
is configured or no alternate attr is configured
(cherry picked from commit ce4e813f3f446bdd746ec288f33d1effcb3bf919)
(cherry picked from commit 2bd9ced46f395513e0aaded8f8eea5962337bffc)
diff --git a/ldap/servers/plugins/acctpolicy/acct_util.c
b/ldap/servers/plugins/acctpolicy/acct_util.c
index a02382f..850cc42 100644
--- a/ldap/servers/plugins/acctpolicy/acct_util.c
+++ b/ldap/servers/plugins/acctpolicy/acct_util.c
@@ -29,6 +29,10 @@ Hewlett-Packard Development Company, L.P.
/* Globals */
static void* plugin_id = NULL;
+/* attributes that no clients are allowed to add or modify */
+static char *protected_attrs_login_recording [] = { "createTimestamp",
+ NULL };
+
/*
Checks whether an entry has a particular attribute type, and optionally
returns the value. Only for use with single-valued attributes - it returns
diff --git a/ldap/servers/plugins/acctpolicy/acctpolicy.h
b/ldap/servers/plugins/acctpolicy/acctpolicy.h
index 78412cd..5c202d3 100644
--- a/ldap/servers/plugins/acctpolicy/acctpolicy.h
+++ b/ldap/servers/plugins/acctpolicy/acctpolicy.h
@@ -35,10 +35,6 @@ Hewlett-Packard Development Company, L.P.
#define DEFAULT_INACT_LIMIT_ATTR "accountInactivityLimit"
#define DEFAULT_RECORD_LOGIN 1
-/* attributes that no clients are allowed to add or modify */
-static char *protected_attrs_login_recording [] = { "createTimestamp",
- NULL };
-
#define PLUGIN_VENDOR "Hewlett-Packard Company"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_CONFIG_DN "cn=config,cn=Account Policy
Plugin,cn=plugins,cn=config"
commit d9a1c7b527d7252195fac15636c22101ceb775bf
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
Date: Tue Jul 30 11:29:47 2013 +0200
fix compiler warning
(cherry picked from commit 904416f4631d842a105851b4a9931ae17822a107)
(cherry picked from commit 3a5f8de21fba3656670b8ee35e020f159d4110db)
(cherry picked from commit efcb1af30b63f91d3235914962bd4aa399bc08ba)
diff --git a/ldap/servers/plugins/acl/aclutil.c b/ldap/servers/plugins/acl/aclutil.c
index 2002276..4f81bc0 100644
--- a/ldap/servers/plugins/acl/aclutil.c
+++ b/ldap/servers/plugins/acl/aclutil.c
@@ -1400,7 +1400,6 @@ void acl_ht_add_and_freeOld(acl_ht_t * acl_ht,
void acl_ht_remove_and_free(acl_ht_t * acl_ht,
PLHashNumber key){
char *old_value = NULL;
- uintptr_t pkey = (uintptr_t)key;
if ( (old_value = (char *)acl_ht_lookup( acl_ht, key)) != NULL ) {
acl_ht_remove( acl_ht, key);