summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-12-11 23:52:52 +0100
committerJakub Hrozek <jhrozek@redhat.com>2012-12-19 00:02:21 +0100
commitdb13f6ae67dc16e47b5e6ea63f8d85d4e8947016 (patch)
tree715cc6e468f2f841bd00734cce7772887542d328
parent4fd6ea53ae9b95633fbe3ce374effedfd5a9091c (diff)
downloadsssd-1.9.2-52.tar.gz
sssd-1.9.2-52.tar.xz
sssd-1.9.2-52.zip
SYSDB: More debugging during the conversion to ghost users1.9.2-52
We've been hitting situations where the sysdb conversion failed. Unfortunately, the current code doesn't include enough debugging info to pinpoint the failing entries. This patch adds more DEBUG statements for each processed entry.
-rw-r--r--src/db/sysdb_upgrade.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/db/sysdb_upgrade.c b/src/db/sysdb_upgrade.c
index 87ae4d19f..fc9b2c964 100644
--- a/src/db/sysdb_upgrade.c
+++ b/src/db/sysdb_upgrade.c
@@ -1059,6 +1059,9 @@ int sysdb_upgrade_10(struct sysdb_ctx *sysdb, const char **ver)
goto done;
}
+ DEBUG(SSSDBG_TRACE_LIBS, ("User [%s] is a member of %d groups\n",
+ name, memberof_el->num_values));
+
for (j = 0; j < memberof_el->num_values; j++) {
msg = ldb_msg_new(tmp_ctx);
if (msg == NULL) {
@@ -1091,6 +1094,9 @@ int sysdb_upgrade_10(struct sysdb_ctx *sysdb, const char **ver)
goto done;
}
+ DEBUG(SSSDBG_TRACE_FUNC, ("Adding ghost [%s] to entry [%s]\n",
+ name, ldb_dn_get_linearized(msg->dn)));
+
ret = ldb_modify(sysdb->ldb, msg);
talloc_zfree(msg);
if (ret != LDB_SUCCESS) {
@@ -1099,6 +1105,9 @@ int sysdb_upgrade_10(struct sysdb_ctx *sysdb, const char **ver)
}
}
+ DEBUG(SSSDBG_TRACE_FUNC, ("Removing fake user [%s]\n",
+ ldb_dn_get_linearized(user->dn)));
+
ret = ldb_delete(sysdb->ldb, user->dn);
if (ret != LDB_SUCCESS) {
ret = sysdb_error_to_errno(ret);