summaryrefslogtreecommitdiffstats
path: root/daemons
diff options
context:
space:
mode:
Diffstat (limited to 'daemons')
-rw-r--r--daemons/ipa-kpasswd/ipa_kpasswd.c6
-rw-r--r--daemons/ipa-slapi-plugins/ipa-modrdn/ipa_modrdn.c4
-rw-r--r--daemons/ipa-slapi-plugins/ipa-uuid/ipa_uuid.c14
-rw-r--r--daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync-config.c4
4 files changed, 20 insertions, 8 deletions
diff --git a/daemons/ipa-kpasswd/ipa_kpasswd.c b/daemons/ipa-kpasswd/ipa_kpasswd.c
index a506cec1d..dd2b4b857 100644
--- a/daemons/ipa-kpasswd/ipa_kpasswd.c
+++ b/daemons/ipa-kpasswd/ipa_kpasswd.c
@@ -491,9 +491,13 @@ int ldap_pwd_change(char *client_name, char *realm_name, krb5_data pwd, char **e
goto done;
}
- ber_printf(ctrl, "{tstO}",
+ ret = ber_printf(ctrl, "{tstO}",
LDAP_TAG_EXOP_MODIFY_PASSWD_ID, userdn,
LDAP_TAG_EXOP_MODIFY_PASSWD_NEW, &newpw);
+ if (ret < 0) {
+ syslog(LOG_ERR, "ber printf failed!");
+ goto done;
+ }
ret = ber_flatten(ctrl, &control);
if (ret < 0) {
diff --git a/daemons/ipa-slapi-plugins/ipa-modrdn/ipa_modrdn.c b/daemons/ipa-slapi-plugins/ipa-modrdn/ipa_modrdn.c
index 6049c0409..45a29a510 100644
--- a/daemons/ipa-slapi-plugins/ipa-modrdn/ipa_modrdn.c
+++ b/daemons/ipa-slapi-plugins/ipa-modrdn/ipa_modrdn.c
@@ -748,8 +748,8 @@ static int ipamodrdn_post_op(Slapi_PBlock *pb)
Slapi_Value *val;
const char *strval;
- slapi_attr_first_value(sattr, &val);
- if (!val) {
+ ret = slapi_attr_first_value(sattr, &val);
+ if (ret == -1 || !val) {
LOG_FATAL("Source attr %s is empty\n", cfgentry->sattr);
continue;
}
diff --git a/daemons/ipa-slapi-plugins/ipa-uuid/ipa_uuid.c b/daemons/ipa-slapi-plugins/ipa-uuid/ipa_uuid.c
index 073b73cb6..83aac77da 100644
--- a/daemons/ipa-slapi-plugins/ipa-uuid/ipa_uuid.c
+++ b/daemons/ipa-slapi-plugins/ipa-uuid/ipa_uuid.c
@@ -815,8 +815,16 @@ static int ipauuid_pre_op(Slapi_PBlock *pb, int modtype)
*/
Slapi_DN *tmp_dn = slapi_sdn_new_dn_byref(dn);
if (tmp_dn) {
- slapi_search_internal_get_entry(tmp_dn, NULL, &e, getPluginID());
+ ret = slapi_search_internal_get_entry(tmp_dn, NULL, &e, getPluginID());
slapi_sdn_free(&tmp_dn);
+
+ if (ret) {
+ LOG_FATAL("slapi_search_internal_get_entry failed!? Err %d\n",
+ ret);
+ ret = LDAP_OPERATIONS_ERROR;
+ goto done;
+ }
+
free_entry = true;
}
@@ -967,8 +975,8 @@ static int ipauuid_pre_op(Slapi_PBlock *pb, int modtype)
Slapi_Attr *sattr = NULL;
int e_numvals = 0;
- slapi_entry_attr_find(e, attr, &sattr);
- if (sattr) {
+ if ((!slapi_entry_attr_find(e, attr, &sattr)) &&
+ (NULL != sattr)) {
slapi_attr_get_numvalues(sattr, &e_numvals);
if (numvals >= e_numvals) {
generate = true;
diff --git a/daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync-config.c b/daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync-config.c
index 1293c4c75..a61cabb14 100644
--- a/daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync-config.c
+++ b/daemons/ipa-slapi-plugins/ipa-winsync/ipa-winsync-config.c
@@ -702,8 +702,8 @@ internal_find_entry_get_attr_val(const Slapi_DN *basedn, int scope,
if (entries && entries[0]) { /* found one */
if (svs) {
Slapi_Attr *attr = NULL;
- slapi_entry_attr_find(entries[0], attrname, &attr);
- if (attr) {
+ if (!slapi_entry_attr_find(entries[0], attrname, &attr) &&
+ (NULL != attr)) {
/* slapi_attr_get_valueset allocates svs - must be freed later */
slapi_attr_get_valueset(attr, svs);
}