From 6fa07dcc178270fbbb2868b58a94c2d814a36408 Mon Sep 17 00:00:00 2001
From: Ondrej Kos <okos@redhat.com>
Date: Mon, 9 Sep 2013 14:54:19 +0200
Subject: [PATCH 2/4] DB: Rise search functions debug levels

---
 src/db/sysdb_ops.c | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 859581aa5b516238db266732a7b9843e23a2edef..bb39ca711b3926f59e14ba73d04f1436c992fae5 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -342,10 +342,10 @@ int sysdb_search_user_by_name(TALLOC_CTX *mem_ctx,
 
 done:
     if (ret == ENOENT) {
-        DEBUG(SSSDBG_TRACE_FUNC, ("No such entry\n"));
+        DEBUG(SSSDBG_OP_FAILURE, ("No such entry\n"));
     }
     else if (ret) {
-        DEBUG(SSSDBG_TRACE_FUNC, ("Error: %d (%s)\n", ret, strerror(ret)));
+        DEBUG(SSSDBG_OP_FAILURE, ("Error: %d (%s)\n", ret, strerror(ret)));
     }
     talloc_zfree(tmp_ctx);
     return ret;
@@ -398,10 +398,10 @@ int sysdb_search_user_by_uid(TALLOC_CTX *mem_ctx,
 
 done:
     if (ret == ENOENT) {
-        DEBUG(SSSDBG_TRACE_FUNC, ("No such entry\n"));
+        DEBUG(SSSDBG_OP_FAILURE, ("No such entry\n"));
     }
     else if (ret) {
-        DEBUG(SSSDBG_TRACE_FUNC, ("Error: %d (%s)\n", ret, strerror(ret)));
+        DEBUG(SSSDBG_OP_FAILURE, ("Error: %d (%s)\n", ret, strerror(ret)));
     }
 
     talloc_zfree(tmp_ctx);
@@ -459,10 +459,10 @@ int sysdb_search_group_by_name(TALLOC_CTX *mem_ctx,
 
 done:
     if (ret == ENOENT) {
-        DEBUG(SSSDBG_TRACE_FUNC, ("No such entry\n"));
+        DEBUG(SSSDBG_OP_FAILURE, ("No such entry\n"));
     }
     else if (ret) {
-        DEBUG(SSSDBG_TRACE_FUNC, ("Error: %d (%s)\n", ret, strerror(ret)));
+        DEBUG(SSSDBG_OP_FAILURE, ("Error: %d (%s)\n", ret, strerror(ret)));
     }
     talloc_zfree(tmp_ctx);
     return ret;
@@ -515,10 +515,10 @@ int sysdb_search_group_by_gid(TALLOC_CTX *mem_ctx,
 
 done:
     if (ret == ENOENT) {
-        DEBUG(SSSDBG_TRACE_FUNC, ("No such entry\n"));
+        DEBUG(SSSDBG_OP_FAILURE, ("No such entry\n"));
     }
     else if (ret) {
-        DEBUG(SSSDBG_TRACE_FUNC, ("Error: %d (%s)\n", ret, strerror(ret)));
+        DEBUG(SSSDBG_OP_FAILURE, ("Error: %d (%s)\n", ret, strerror(ret)));
     }
 
     talloc_zfree(tmp_ctx);
@@ -576,10 +576,10 @@ int sysdb_search_netgroup_by_name(TALLOC_CTX *mem_ctx,
 
 done:
     if (ret == ENOENT) {
-        DEBUG(SSSDBG_TRACE_FUNC, ("No such entry\n"));
+        DEBUG(SSSDBG_OP_FAILURE, ("No such entry\n"));
     }
     else if (ret) {
-        DEBUG(SSSDBG_TRACE_FUNC, ("Error: %d (%s)\n", ret, strerror(ret)));
+        DEBUG(SSSDBG_OP_FAILURE, ("Error: %d (%s)\n", ret, strerror(ret)));
     }
     talloc_zfree(tmp_ctx);
     return ret;
@@ -638,10 +638,10 @@ int sysdb_set_entry_attr(struct sysdb_ctx *sysdb,
 
 done:
     if (ret == ENOENT) {
-        DEBUG(SSSDBG_TRACE_FUNC, ("No such entry\n"));
+        DEBUG(SSSDBG_OP_FAILURE, ("No such entry\n"));
     }
     else if (ret) {
-        DEBUG(SSSDBG_TRACE_FUNC, ("Error: %d (%s)\n", ret, strerror(ret)));
+        DEBUG(SSSDBG_OP_FAILURE, ("Error: %d (%s)\n", ret, strerror(ret)));
     }
     talloc_zfree(tmp_ctx);
     return ret;
@@ -2446,10 +2446,10 @@ int sysdb_asq_search(TALLOC_CTX *mem_ctx,
 
 fail:
     if (ret == ENOENT) {
-        DEBUG(SSSDBG_TRACE_FUNC, ("No such entry\n"));
+        DEBUG(SSSDBG_OP_FAILURE, ("No such entry\n"));
     }
     else if (ret) {
-        DEBUG(SSSDBG_TRACE_FUNC, ("Error: %d (%s)\n", ret, strerror(ret)));
+        DEBUG(SSSDBG_OP_FAILURE, ("Error: %d (%s)\n", ret, strerror(ret)));
     }
     talloc_zfree(tmp_ctx);
     return ret;
@@ -2780,9 +2780,9 @@ int sysdb_search_netgroups(TALLOC_CTX *mem_ctx,
 
 fail:
     if (ret == ENOENT) {
-        DEBUG(SSSDBG_TRACE_FUNC, ("Entry not found\n"));
+        DEBUG(SSSDBG_OP_FAILURE, ("Entry not found\n"));
     } else {
-        DEBUG(SSSDBG_TRACE_FUNC, ("Error: %d (%s)\n", ret, strerror(ret)));
+        DEBUG(SSSDBG_OP_FAILURE, ("Error: %d (%s)\n", ret, strerror(ret)));
     }
     talloc_zfree(tmp_ctx);
     return ret;
@@ -3323,9 +3323,9 @@ errno_t sysdb_search_object_by_sid(TALLOC_CTX *mem_ctx,
 
 done:
     if (ret == ENOENT) {
-        DEBUG(SSSDBG_TRACE_FUNC, ("No such entry.\n"));
+        DEBUG(SSSDBG_OP_FAILURE, ("No such entry.\n"));
     } else if (ret) {
-        DEBUG(SSSDBG_TRACE_FUNC, ("Error: %d (%s)\n", ret, strerror(ret)));
+        DEBUG(SSSDBG_OP_FAILURE, ("Error: %d (%s)\n", ret, strerror(ret)));
     }
 
     talloc_zfree(tmp_ctx);
-- 
1.8.1.4

