diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2012-12-11 23:52:52 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2012-12-12 13:30:31 +0100 |
commit | 3cf417b8502f5af34e6680f12a3365bcdd9fa40d (patch) | |
tree | 764fedf00260e07e8a3a3946f55b9b01c0c51128 /src | |
parent | 3f23f27cd77eb4dbf362a0a4fdfbe0b18a2fb714 (diff) | |
download | sssd-3cf417b8502f5af34e6680f12a3365bcdd9fa40d.tar.gz sssd-3cf417b8502f5af34e6680f12a3365bcdd9fa40d.tar.xz sssd-3cf417b8502f5af34e6680f12a3365bcdd9fa40d.zip |
SYSDB: More debugging during the conversion to ghost users
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/db/sysdb_upgrade.c | 9 |
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); |