1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

r18433: Make sure to search below the partitions baseDN for the netbios name.

I think we should have a helper function for this search, we do it too
often...

Andrew Bartlett
(This used to be commit 09327baa0ded3a98398b266c960f827b29021d91)
This commit is contained in:
Andrew Bartlett 2006-09-12 22:03:24 +00:00 committed by Gerald (Jerry) Carter
parent daff791c27
commit 7d2a820157

View File

@ -45,6 +45,7 @@ static void nbtd_netlogon_getdc(struct dgram_mailslot_handler *dgmslot,
const char *ref_attrs[] = {"nETBIOSName", NULL};
struct ldb_message **ref_res;
struct ldb_context *samctx;
const struct ldb_dn *partitions_basedn;
int ret;
/* only answer getdc requests on the PDC or LOGON names */
@ -58,7 +59,9 @@ static void nbtd_netlogon_getdc(struct dgram_mailslot_handler *dgmslot,
return;
}
ret = gendb_search(samctx, samctx, NULL, &ref_res, ref_attrs,
partitions_basedn = samdb_partitions_dn(sam_ctx, mem_ctx);
ret = gendb_search(samctx, samctx, partitions_basedn, &ref_res, ref_attrs,
"(&(&(nETBIOSName=%s)(objectclass=crossRef))(ncName=*))",
name->name);