From: Andreas Schneider Date: Wed, 5 Nov 2025 11:28:39 +0000 (+0100) Subject: s3:winbind: Improve logging for query_user_list() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;p=thirdparty%2Fsamba.git s3:winbind: Improve logging for query_user_list() Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Fri Nov 7 16:06:50 UTC 2025 on atb-devel-224 --- diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c index 42b8df2623d..bb5e664a032 100644 --- a/source3/winbindd/winbindd_ads.c +++ b/source3/winbindd/winbindd_ads.c @@ -337,17 +337,24 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain, ok = ads_pull_uint32(ads, msg, "sAMAccountType", &atype); if (!ok) { - DBG_INFO("Object lacks sAMAccountType attribute\n"); + char *dn = ads_get_dn(ads, talloc_tos(), msg); + DBG_INFO("Object %s lacks sAMAccountType attribute\n", + dn == NULL ? "(null)" : dn); + TALLOC_FREE(dn); continue; } if (ds_atype_map(atype) != SID_NAME_USER) { - DBG_INFO("Not a user account? atype=0x%x\n", atype); + char *dn = ads_get_dn(ads, talloc_tos(), msg); + DBG_INFO("Object %s not a user account? atype=0x%x\n", + dn == NULL ? "(null)" : dn, atype); + TALLOC_FREE(dn); continue; } if (!ads_pull_sid(ads, msg, "objectSid", &user_sid)) { char *dn = ads_get_dn(ads, talloc_tos(), msg); - DBG_INFO("No sid for %s !?\n", dn); + DBG_INFO("No sid for %s !?\n", + dn == NULL ? "(null)" : dn); TALLOC_FREE(dn); continue; }