summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-11-25 06:38:17 +0000
committerJeremy Allison <jra@samba.org>2001-11-25 06:38:17 +0000
commit86dee43f390d7fdfdfb90c67189a38ed8398f8d9 (patch)
treecc01ea1a73001a448c3c2785022a8adefd684312 /source3/libsmb
parent1b1b8e39b2ce4bf32517e7178ca18b3fd8fecd03 (diff)
downloadsamba-86dee43f390d7fdfdfb90c67189a38ed8398f8d9.tar.gz
samba-86dee43f390d7fdfdfb90c67189a38ed8398f8d9.tar.bz2
samba-86dee43f390d7fdfdfb90c67189a38ed8398f8d9.zip
Use "password server" for searching for BDC's also as Tim suggested.
Jeremy. (This used to be commit 4aca67761fbe601e27f8f768c28a11241f088bba)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/namequery.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index f8688ddb25..dff3570842 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -1181,12 +1181,14 @@ NT GETDC call, UNICODE, NT domain SID and uncle tom cobbley and all...
BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *count)
{
+ int name_type = pdc_only ? 0x1B : 0x1C;
+
/*
- * If we're looking for a PDC and it's our domain then
+ * If it's our domain then
* use the 'password server' parameter.
*/
- if (pdc_only && strequal(group, lp_workgroup())) {
+ if (strequal(group, lp_workgroup())) {
char *p;
char *pserver = lp_passwordserver();
fstring name;
@@ -1194,16 +1196,16 @@ BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *coun
struct in_addr *return_iplist = NULL;
if (! *pserver)
- return internal_resolve_name(group, 0x1B, ip_list, count);
+ return internal_resolve_name(group, name_type, ip_list, count);
p = pserver;
while (next_token(&p,name,LIST_SEP,sizeof(name))) {
if (strequal(name, "*"))
- return internal_resolve_name(group, 0x1B, ip_list, count);
+ return internal_resolve_name(group, name_type, ip_list, count);
num_adresses++;
}
if (num_adresses == 0)
- return internal_resolve_name(group, 0x1B, ip_list, count);
+ return internal_resolve_name(group, name_type, ip_list, count);
return_iplist = (struct in_addr *)malloc(num_adresses * sizeof(struct in_addr));
if(return_iplist == NULL) {
@@ -1221,7 +1223,7 @@ BOOL get_dc_list(BOOL pdc_only, char *group, struct in_addr **ip_list, int *coun
*ip_list = return_iplist;
return (*count != 0);
} else
- return internal_resolve_name(group, pdc_only ? 0x1B : 0x1C, ip_list, count);
+ return internal_resolve_name(group, name_type, ip_list, count);
}
/********************************************************