While working on: https://fedorahosted.org/sssd/ticket/1991
I found some typos and other small problems which are not directly related to the ticket. See attached patches please. PR
>From 5360b8e4a919dc908a22616a540e0097d5254e83 Mon Sep 17 00:00:00 2001 From: Pavel Reichl <pavel.rei...@redhat.com> Date: Wed, 18 Dec 2013 14:07:42 +0000 Subject: [PATCH 1/3] SYSDB: typos & debug macro constants --- src/db/sysdb_ops.c | 5 +++-- src/db/sysdb_search.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c index c08415b095ce96623b88d7a47131324652bc88ac..9621b281aa57d05e07ebbc2ed17b22ba4b7c2437 100644 --- a/src/db/sysdb_ops.c +++ b/src/db/sysdb_ops.c @@ -170,7 +170,8 @@ int sysdb_delete_recursive(struct sysdb_ctx *sysdb, ret = EOK; } if (ret) { - DEBUG(6, ("Search error: %d (%s)\n", ret, strerror(ret))); + DEBUG(SSSDBG_TRACE_FUNC, ("Search error: %d (%s)\n", + ret, strerror(ret))); } goto done; } @@ -181,7 +182,7 @@ int sysdb_delete_recursive(struct sysdb_ctx *sysdb, sizeof(struct ldb_message *), compare_ldb_dn_comp_num); for (i = 0; i < msgs_count; i++) { - DEBUG(9 ,("Trying to delete [%s].\n", + DEBUG(SSSDBG_TRACE_ALL, ("Trying to delete [%s].\n", ldb_dn_get_linearized(msgs[i]->dn))); ret = sysdb_delete_entry(sysdb, msgs[i]->dn, false); diff --git a/src/db/sysdb_search.c b/src/db/sysdb_search.c index f2599a18ac5b5e294220feb9cec50ed85a5e70d7..53c8f0164ed0143020583935f314a8679f7318fa 100644 --- a/src/db/sysdb_search.c +++ b/src/db/sysdb_search.c @@ -52,7 +52,7 @@ int sysdb_getpwnam(TALLOC_CTX *mem_ctx, goto done; } - /* If this is a subomain we need to use fully qualified names for the + /* If this is a subdomain we need to use fully qualified names for the * search as well by default */ src_name = sss_get_domain_name(tmp_ctx, name, domain); if (!src_name) { -- 1.8.3.1
>From 385de30109199d3e8b603e30e8e003cd875ee70d Mon Sep 17 00:00:00 2001 From: Pavel Reichl <pavel.rei...@redhat.com> Date: Wed, 18 Dec 2013 14:10:21 +0000 Subject: [PATCH 2/3] SYSDB: missing conversion of LDB error to errno --- src/db/sysdb_ops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c index 9621b281aa57d05e07ebbc2ed17b22ba4b7c2437..81d702f425b067237aa716a207da9ee6c9e2665e 100644 --- a/src/db/sysdb_ops.c +++ b/src/db/sysdb_ops.c @@ -3338,6 +3338,7 @@ errno_t sysdb_search_object_by_sid(TALLOC_CTX *mem_ctx, basedn, LDB_SCOPE_SUBTREE, attrs?attrs:def_attrs, SYSDB_SID_FILTER, sid_str); if (ret != EOK) { + ret = sysdb_error_to_errno(ret); DEBUG(SSSDBG_OP_FAILURE, ("ldb_search failed.\n")); goto done; } -- 1.8.3.1
>From 8a26cd47e28b506889a29023d5f5cc8287cc9a08 Mon Sep 17 00:00:00 2001 From: Pavel Reichl <pavel.rei...@redhat.com> Date: Wed, 18 Dec 2013 14:13:31 +0000 Subject: [PATCH 3/3] SYSDB: simplification of condition in if statement else-if statement is checking for condition which is handled by previous if statement. --- src/db/sysdb_search.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/sysdb_search.c b/src/db/sysdb_search.c index 53c8f0164ed0143020583935f314a8679f7318fa..83681384fd60263ed24dab6c8dfa1ef478e24a7e 100644 --- a/src/db/sysdb_search.c +++ b/src/db/sysdb_search.c @@ -932,7 +932,7 @@ errno_t sysdb_get_direct_parents(TALLOC_CTX *mem_ctx, &direct_sysdb_count, &direct_sysdb_groups); if (ret == ENOENT) { direct_sysdb_count = 0; - } else if (ret != EOK && ret != ENOENT) { + } else if (ret != EOK) { DEBUG(2, ("sysdb_search_entry failed: [%d]: %s\n", ret, strerror(ret))); goto done; -- 1.8.3.1
_______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/sssd-devel