summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/confdb/confdb.c6
-rw-r--r--src/db/sysdb.c5
-rw-r--r--src/db/sysdb_gpo.c6
-rw-r--r--src/db/sysdb_idmap.c4
-rw-r--r--src/db/sysdb_ops.c28
-rw-r--r--src/db/sysdb_services.c10
-rw-r--r--src/db/sysdb_sudo.c5
-rw-r--r--src/db/sysdb_views.c14
8 files changed, 68 insertions, 10 deletions
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
index f94de308e..dd93410cf 100644
--- a/src/confdb/confdb.c
+++ b/src/confdb/confdb.c
@@ -200,6 +200,9 @@ int confdb_add_param(struct confdb_ctx *cdb,
ret = ldb_modify(cdb->ldb, msg);
if (ret != LDB_SUCCESS) {
+ DEBUG(SSSDBG_MINOR_FAILURE,
+ "ldb_modify failed: [%s](%d)[%s]\n",
+ ldb_strerror(ret), ret, ldb_errstring(cdb->ldb));
ret = EIO;
goto done;
}
@@ -348,7 +351,8 @@ int confdb_set_string(struct confdb_ctx *cdb,
lret = ldb_modify(cdb->ldb, msg);
if (lret != LDB_SUCCESS) {
DEBUG(SSSDBG_MINOR_FAILURE,
- "ldb_modify failed: [%s]\n", ldb_strerror(lret));
+ "ldb_modify failed: [%s](%d)[%s]\n",
+ ldb_strerror(lret), lret, ldb_errstring(cdb->ldb));
ret = EIO;
goto done;
}
diff --git a/src/db/sysdb.c b/src/db/sysdb.c
index 6be5e8026..9da655759 100644
--- a/src/db/sysdb.c
+++ b/src/db/sysdb.c
@@ -1636,6 +1636,11 @@ errno_t sysdb_set_bool(struct sysdb_ctx *sysdb,
lret = ldb_add(sysdb->ldb, msg);
}
+ if (lret != LDB_SUCCESS) {
+ DEBUG(SSSDBG_OP_FAILURE,
+ "ldb operation failed: [%s](%d)[%s]\n",
+ ldb_strerror(lret), lret, ldb_errstring(sysdb->ldb));
+ }
ret = sysdb_error_to_errno(lret);
done:
diff --git a/src/db/sysdb_gpo.c b/src/db/sysdb_gpo.c
index b43565cbf..e5af91bd8 100644
--- a/src/db/sysdb_gpo.c
+++ b/src/db/sysdb_gpo.c
@@ -208,7 +208,8 @@ sysdb_gpo_store_gpo(struct sss_domain_info *domain,
lret = ldb_modify(domain->sysdb->ldb, update_msg);
if (lret != LDB_SUCCESS) {
DEBUG(SSSDBG_MINOR_FAILURE,
- "Failed to modify GPO: [%s]\n", ldb_strerror(lret));
+ "Failed to modify GPO: [%s](%d)[%s]\n",
+ ldb_strerror(lret), lret, ldb_errstring(domain->sysdb->ldb));
ret = sysdb_error_to_errno(lret);
goto done;
}
@@ -500,7 +501,8 @@ sysdb_gpo_store_gpo_result_setting(struct sss_domain_info *domain,
lret = ldb_modify(domain->sysdb->ldb, update_msg);
if (lret != LDB_SUCCESS) {
DEBUG(SSSDBG_MINOR_FAILURE,
- "Failed to modify GPO Result: [%s]\n", ldb_strerror(lret));
+ "Failed to modify GPO Result: [%s](%d)[%s]\n",
+ ldb_strerror(lret), lret, ldb_errstring(domain->sysdb->ldb));
ret = sysdb_error_to_errno(lret);
goto done;
}
diff --git a/src/db/sysdb_idmap.c b/src/db/sysdb_idmap.c
index 2c3634d1c..2aa00ef83 100644
--- a/src/db/sysdb_idmap.c
+++ b/src/db/sysdb_idmap.c
@@ -247,8 +247,8 @@ sysdb_idmap_store_mapping(struct sss_domain_info *domain,
lret = ldb_modify(domain->sysdb->ldb, update_msg);
if (lret != LDB_SUCCESS) {
DEBUG(SSSDBG_MINOR_FAILURE,
- "Failed to update mapping: [%s]\n",
- ldb_strerror(lret));
+ "Failed to update mapping: [%s](%d)[%s]\n",
+ ldb_strerror(lret), lret, ldb_errstring(domain->sysdb->ldb));
ret = sysdb_error_to_errno(lret);
goto done;
}
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index acdc8415b..183406ebe 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -704,7 +704,8 @@ int sysdb_set_entry_attr(struct sysdb_ctx *sysdb,
lret = ldb_modify(sysdb->ldb, msg);
if (lret != LDB_SUCCESS) {
DEBUG(SSSDBG_MINOR_FAILURE,
- "ldb_modify failed: [%s]\n", ldb_strerror(lret));
+ "ldb_modify failed: [%s](%d)[%s]\n",
+ ldb_strerror(lret), lret, ldb_errstring(sysdb->ldb));
}
ret = sysdb_error_to_errno(lret);
@@ -966,6 +967,11 @@ int sysdb_get_new_id(struct sss_domain_info *domain,
}
ret = ldb_modify(domain->sysdb->ldb, msg);
+ if (ret != LDB_SUCCESS) {
+ DEBUG(SSSDBG_MINOR_FAILURE,
+ "ldb_modify failed: [%s](%d)[%s]\n",
+ ldb_strerror(ret), ret, ldb_errstring(domain->sysdb->ldb));
+ }
ret = sysdb_error_to_errno(ret);
*_id = new_id;
@@ -1136,6 +1142,12 @@ sysdb_remove_ghost_from_group(struct sss_domain_info *dom,
ret = sss_ldb_modify_permissive(dom->sysdb->ldb, msg);
+ if (ret != LDB_SUCCESS) {
+ DEBUG(SSSDBG_MINOR_FAILURE,
+ "sss_ldb_modify_permissive failed: [%s](%d)[%s]\n",
+ ldb_strerror(ret), ret, ldb_errstring(dom->sysdb->ldb));
+ }
+
ret = sysdb_error_to_errno(ret);
if (ret != EOK) {
goto done;
@@ -1703,6 +1715,11 @@ int sysdb_mod_group_member(struct sss_domain_info *domain,
}
ret = ldb_modify(domain->sysdb->ldb, msg);
+ if (ret != LDB_SUCCESS) {
+ DEBUG(SSSDBG_MINOR_FAILURE,
+ "ldb_modify failed: [%s](%d)[%s]\n",
+ ldb_strerror(ret), ret, ldb_errstring(domain->sysdb->ldb));
+ }
ret = sysdb_error_to_errno(ret);
fail:
@@ -2746,6 +2763,12 @@ int sysdb_delete_user(struct sss_domain_info *domain,
if (ret) goto fail;
ret = ldb_modify(domain->sysdb->ldb, msg);
+ if (ret != LDB_SUCCESS) {
+ DEBUG(SSSDBG_MINOR_FAILURE,
+ "ldb_modify failed: [%s](%d)[%s]\n",
+ ldb_strerror(ret), ret,
+ ldb_errstring(domain->sysdb->ldb));
+ }
ret = sysdb_error_to_errno(ret);
if (ret != EOK) {
goto fail;
@@ -3474,6 +3497,9 @@ errno_t sysdb_remove_attrs(struct sss_domain_info *domain,
*/
lret = ldb_modify(domain->sysdb->ldb, msg);
if (lret != LDB_SUCCESS && lret != LDB_ERR_NO_SUCH_ATTRIBUTE) {
+ DEBUG(SSSDBG_MINOR_FAILURE,
+ "ldb_modify failed: [%s](%d)[%s]\n",
+ ldb_strerror(lret), lret, ldb_errstring(domain->sysdb->ldb));
ret = sysdb_error_to_errno(lret);
goto done;
}
diff --git a/src/db/sysdb_services.c b/src/db/sysdb_services.c
index 5f2315e72..37f7ec5ff 100644
--- a/src/db/sysdb_services.c
+++ b/src/db/sysdb_services.c
@@ -590,6 +590,11 @@ sysdb_svc_update(struct sysdb_ctx *sysdb,
}
lret = ldb_modify(sysdb->ldb, msg);
+ if (lret != LDB_SUCCESS) {
+ DEBUG(SSSDBG_MINOR_FAILURE,
+ "ldb_modify failed: [%s](%d)[%s]\n",
+ ldb_strerror(lret), lret, ldb_errstring(sysdb->ldb));
+ }
ret = sysdb_error_to_errno(lret);
done:
@@ -623,6 +628,11 @@ sysdb_svc_remove_alias(struct sysdb_ctx *sysdb,
if (ret != EOK) goto done;
lret = ldb_modify(sysdb->ldb, msg);
+ if (lret != LDB_SUCCESS) {
+ DEBUG(SSSDBG_MINOR_FAILURE,
+ "ldb_modify failed: [%s](%d)[%s]\n",
+ ldb_strerror(lret), lret, ldb_errstring(sysdb->ldb));
+ }
ret = sysdb_error_to_errno(lret);
done:
diff --git a/src/db/sysdb_sudo.c b/src/db/sysdb_sudo.c
index 261ed82d6..54f726fff 100644
--- a/src/db/sysdb_sudo.c
+++ b/src/db/sysdb_sudo.c
@@ -521,6 +521,11 @@ static errno_t sysdb_sudo_set_refresh_time(struct sss_domain_info *domain,
lret = ldb_add(domain->sysdb->ldb, msg);
}
+ if (lret != LDB_SUCCESS) {
+ DEBUG(SSSDBG_MINOR_FAILURE,
+ "ldb operation failed: [%s](%d)[%s]\n",
+ ldb_strerror(lret), lret, ldb_errstring(domain->sysdb->ldb));
+ }
ret = sysdb_error_to_errno(lret);
done:
diff --git a/src/db/sysdb_views.c b/src/db/sysdb_views.c
index 717edf20a..431d33454 100644
--- a/src/db/sysdb_views.c
+++ b/src/db/sysdb_views.c
@@ -165,8 +165,10 @@ errno_t sysdb_update_view_name(struct sysdb_ctx *sysdb,
ret = ldb_add(sysdb->ldb, msg);
}
if (ret != LDB_SUCCESS) {
- DEBUG(SSSDBG_FATAL_FAILURE, "Failed to %s view container",
- view_container_exists ? "modify" : "add");
+ DEBUG(SSSDBG_FATAL_FAILURE,
+ "Failed to %s view container [%s](%d)[%s]\n",
+ view_container_exists ? "modify" : "add",
+ ldb_strerror(ret), ret, ldb_errstring(sysdb->ldb));
ret = sysdb_error_to_errno(ret);
goto done;
}
@@ -282,7 +284,9 @@ errno_t sysdb_invalidate_overrides(struct sysdb_ctx *sysdb)
ret = ldb_modify(sysdb->ldb, msg);
if (ret != LDB_SUCCESS && ret != LDB_ERR_NO_SUCH_ATTRIBUTE) {
- DEBUG(SSSDBG_OP_FAILURE, "ldb_modify failed.\n");
+ DEBUG(SSSDBG_OP_FAILURE,
+ "ldb_modify failed: [%s](%d)[%s]\n",
+ ldb_strerror(ret), ret, ldb_errstring(sysdb->ldb));
ret = sysdb_error_to_errno(ret);
goto done;
}
@@ -303,7 +307,9 @@ errno_t sysdb_invalidate_overrides(struct sysdb_ctx *sysdb)
ret = ldb_modify(sysdb->ldb, msg);
if (ret != LDB_SUCCESS && ret != LDB_ERR_NO_SUCH_ATTRIBUTE) {
- DEBUG(SSSDBG_OP_FAILURE, "ldb_modify failed.\n");
+ DEBUG(SSSDBG_OP_FAILURE,
+ "ldb_modify failed: [%s](%d)[%s]\n",
+ ldb_strerror(ret), ret, ldb_errstring(sysdb->ldb));
ret = sysdb_error_to_errno(ret);
goto done;
}