]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:winbind: Improve logging for query_user_list() master
authorAndreas Schneider <asn@samba.org>
Wed, 5 Nov 2025 11:28:39 +0000 (12:28 +0100)
committerVolker Lendecke <vl@samba.org>
Fri, 7 Nov 2025 16:06:50 +0000 (16:06 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Nov  7 16:06:50 UTC 2025 on atb-devel-224

source3/winbindd/winbindd_ads.c

index 42b8df2623d5e4586c17b88f4745451ddaa4a762..bb5e664a032d894d0dbe536826a0245efdfed71c 100644 (file)
@@ -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;
                }