diff options
Diffstat (limited to 'src/providers/ldap/ldap_id_cleanup.c')
-rw-r--r-- | src/providers/ldap/ldap_id_cleanup.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/providers/ldap/ldap_id_cleanup.c b/src/providers/ldap/ldap_id_cleanup.c index f78d4b404..dd1e2d7db 100644 --- a/src/providers/ldap/ldap_id_cleanup.c +++ b/src/providers/ldap/ldap_id_cleanup.c @@ -236,6 +236,7 @@ static int cleanup_users(struct sdap_options *opts, * the cleanup in that case */ if (ret != EOK && ret != ENOSYS) { + DEBUG(SSSDBG_CRIT_FAILURE, "get_uid_table failed: %d\n", ret); goto done; } @@ -247,6 +248,7 @@ static int cleanup_users(struct sdap_options *opts, ret = EFAULT; goto done; } + DEBUG(SSSDBG_TRACE_ALL, "Processing user %s\n", name); if (uid_table) { ret = cleanup_users_logged_in(uid_table, msgs[i]); @@ -257,6 +259,8 @@ static int cleanup_users(struct sdap_options *opts, "keeping data\n", name); continue; } else if (ret != ENOENT) { + DEBUG(SSSDBG_CRIT_FAILURE, + "Cannot check if user is logged in: %d\n", ret); goto done; } } @@ -265,6 +269,7 @@ static int cleanup_users(struct sdap_options *opts, DEBUG(SSSDBG_TRACE_ALL, "About to delete user %s\n", name); ret = sysdb_delete_user(dom, name, 0); if (ret) { + DEBUG(SSSDBG_CRIT_FAILURE, "sysdb_delete_user failed: %d\n", ret); goto done; } } @@ -300,6 +305,7 @@ static int cleanup_users_logged_in(hash_table_t *table, return ENOENT; } + DEBUG(SSSDBG_OP_FAILURE, "hash_lookup failed: %d\n", ret); return EIO; } @@ -356,6 +362,7 @@ static int cleanup_groups(TALLOC_CTX *memctx, for (i = 0; i < count; i++) { dn = ldb_dn_get_linearized(msgs[i]->dn); if (!dn) { + DEBUG(SSSDBG_CRIT_FAILURE, "Cannot linearize DN!\n"); ret = EFAULT; goto done; } @@ -387,6 +394,8 @@ static int cleanup_groups(TALLOC_CTX *memctx, goto done; } + DEBUG(SSSDBG_TRACE_LIBS, "Searching with: %s\n", subfilter); + ret = sysdb_search_entry(tmpctx, sysdb, base_dn, LDB_SCOPE_SUBTREE, subfilter, NULL, &u_count, &u_msgs); @@ -410,6 +419,8 @@ static int cleanup_groups(TALLOC_CTX *memctx, } } if (ret != EOK) { + DEBUG(SSSDBG_CRIT_FAILURE, + "Failed to search sysdb using %s: %d\n", subfilter, ret); goto done; } talloc_zfree(u_msgs); |