[PATCH] Improve two idmap DEBUGs

Volker Lendecke vl at samba.org
Tue Dec 27 11:25:14 UTC 2016


Hi!

Review appreciated!

Thanks, Volker
-------------- next part --------------
>From baec4fd5c597d26d2dd13bd938b133c685f11a45 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Sun, 11 Dec 2016 19:57:12 +0100
Subject: [PATCH 1/2] idmap_autorid: Add the error string in a debug

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source3/winbindd/idmap_autorid.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c
index c27c5035562..786f83965d4 100644
--- a/source3/winbindd/idmap_autorid.c
+++ b/source3/winbindd/idmap_autorid.c
@@ -343,8 +343,9 @@ static NTSTATUS idmap_autorid_unixids_to_sids(struct idmap_domain *dom,
 		if ((!NT_STATUS_IS_OK(ret)) &&
 		    (!NT_STATUS_EQUAL(ret, NT_STATUS_NONE_MAPPED))) {
 			/* some fatal error occurred, log it */
-			DEBUG(3, ("Unexpected error resolving an ID "
-				  " (%d)\n", ids[i]->xid.id));
+			DBG_NOTICE("Unexpected error resolving an ID "
+				   "(%d): %s\n", ids[i]->xid.id,
+				   nt_errstr(ret));
 			goto failure;
 		}
 
-- 
2.11.0


>From 41cbac81447c6b5d06411ab66c38b7b67965b2b5 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Sun, 11 Dec 2016 19:57:20 +0100
Subject: [PATCH 2/2] idmap_rid: Add the error string in a debug

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source3/winbindd/idmap_rid.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/source3/winbindd/idmap_rid.c b/source3/winbindd/idmap_rid.c
index d68dbf788d7..ac537053e52 100644
--- a/source3/winbindd/idmap_rid.c
+++ b/source3/winbindd/idmap_rid.c
@@ -143,7 +143,9 @@ static NTSTATUS idmap_rid_unixids_to_sids(struct idmap_domain *dom, struct id_ma
 		if (( ! NT_STATUS_IS_OK(ret)) &&
 		    ( ! NT_STATUS_EQUAL(ret, NT_STATUS_NONE_MAPPED))) {
 			/* some fatal error occurred, log it */
-			DEBUG(3, ("Unexpected error resolving an ID (%d)\n", ids[i]->xid.id));
+			DBG_NOTICE("Unexpected error resolving an ID "
+				   "(%d): %s\n", ids[i]->xid.id,
+				   nt_errstr(ret));
 		}
 	}
 
-- 
2.11.0



More information about the samba-technical mailing list