summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_rpc.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-01-05 04:10:28 +0000
committerAndrew Bartlett <abartlet@samba.org>2004-01-05 04:10:28 +0000
commita7f8c26d24b78dc6a0f829cf7b53112e5ddbdeda (patch)
tree7452bffcb646e5c1fb4c02d43b61645733c5c97e /source3/nsswitch/winbindd_rpc.c
parent72de1cd0f7701cb0b66c4eebc0c103a6b62c1cd7 (diff)
downloadsamba-a7f8c26d24b78dc6a0f829cf7b53112e5ddbdeda.tar.gz
samba-a7f8c26d24b78dc6a0f829cf7b53112e5ddbdeda.tar.bz2
samba-a7f8c26d24b78dc6a0f829cf7b53112e5ddbdeda.zip
Change our Domain controller lookup routines to more carefully seperate
DNS names (realms) from NetBIOS domain names. Until now, we would experience delays as we broadcast lookups for DNS names onto the local network segments. Now if DNS comes back negative, we fall straight back to looking up the short name. Andrew Bartlett (This used to be commit 32397c8b01f1dec7b05140d210bb32f836a80ca6)
Diffstat (limited to 'source3/nsswitch/winbindd_rpc.c')
-rw-r--r--source3/nsswitch/winbindd_rpc.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source3/nsswitch/winbindd_rpc.c b/source3/nsswitch/winbindd_rpc.c
index 813621f3f7..f619aa3564 100644
--- a/source3/nsswitch/winbindd_rpc.c
+++ b/source3/nsswitch/winbindd_rpc.c
@@ -53,7 +53,7 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain,
do {
/* Get sam handle */
- if ( !NT_STATUS_IS_OK(result = cm_get_sam_handle(domain->name, &hnd)) )
+ if ( !NT_STATUS_IS_OK(result = cm_get_sam_handle(domain, &hnd)) )
return result;
/* Get domain handle */
@@ -163,7 +163,7 @@ static NTSTATUS enum_dom_groups(struct winbindd_domain *domain,
retry = 0;
do {
- if (!NT_STATUS_IS_OK(result = cm_get_sam_handle(domain->name, &hnd)))
+ if (!NT_STATUS_IS_OK(result = cm_get_sam_handle(domain, &hnd)))
return result;
status = cli_samr_open_domain(hnd->cli, mem_ctx,
@@ -228,7 +228,7 @@ static NTSTATUS enum_local_groups(struct winbindd_domain *domain,
retry = 0;
do {
- if ( !NT_STATUS_IS_OK(result = cm_get_sam_handle(domain->name, &hnd)) )
+ if ( !NT_STATUS_IS_OK(result = cm_get_sam_handle(domain, &hnd)) )
return result;
result = cli_samr_open_domain( hnd->cli, mem_ctx, &hnd->pol,
@@ -300,7 +300,7 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
retry = 0;
do {
- if (!NT_STATUS_IS_OK(result = cm_get_lsa_handle(domain->name, &hnd))) {
+ if (!NT_STATUS_IS_OK(result = cm_get_lsa_handle(domain, &hnd))) {
return result;
}
@@ -340,7 +340,7 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
retry = 0;
do {
- if (!NT_STATUS_IS_OK(result = cm_get_lsa_handle(domain->name, &hnd)))
+ if (!NT_STATUS_IS_OK(result = cm_get_lsa_handle(domain, &hnd)))
return result;
result = cli_lsa_lookup_sids(hnd->cli, mem_ctx, &hnd->pol,
@@ -409,7 +409,7 @@ static NTSTATUS query_user(struct winbindd_domain *domain,
do {
/* Get sam handle; if we fail here there is no hope */
- if (!NT_STATUS_IS_OK(result = cm_get_sam_handle(domain->name, &hnd)))
+ if (!NT_STATUS_IS_OK(result = cm_get_sam_handle(domain, &hnd)))
goto done;
/* Get domain handle */
@@ -510,7 +510,7 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
do {
/* Get sam handle; if we fail here there is no hope */
- if (!NT_STATUS_IS_OK(result = cm_get_sam_handle(domain->name, &hnd)))
+ if (!NT_STATUS_IS_OK(result = cm_get_sam_handle(domain, &hnd)))
goto done;
/* Get domain handle */
@@ -598,7 +598,7 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
retry = 0;
do {
/* Get sam handle */
- if (!NT_STATUS_IS_OK(result = cm_get_sam_handle(domain->name, &hnd)))
+ if (!NT_STATUS_IS_OK(result = cm_get_sam_handle(domain, &hnd)))
goto done;
/* Get domain handle */
@@ -876,7 +876,7 @@ static NTSTATUS sequence_number(struct winbindd_domain *domain, uint32 *seq)
}
#endif /* HAVE_LDAP */
/* Get sam handle */
- if (!NT_STATUS_IS_OK(result = cm_get_sam_handle(domain->name, &hnd)))
+ if (!NT_STATUS_IS_OK(result = cm_get_sam_handle(domain, &hnd)))
goto done;
/* Get domain handle */
@@ -932,7 +932,7 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain,
retry = 0;
do {
- if (!NT_STATUS_IS_OK(result = cm_get_lsa_handle(lp_workgroup(), &hnd)))
+ if (!NT_STATUS_IS_OK(result = cm_get_lsa_handle(find_our_domain(), &hnd)))
goto done;
result = cli_lsa_enum_trust_dom(hnd->cli, mem_ctx,
@@ -961,7 +961,7 @@ static NTSTATUS domain_sid(struct winbindd_domain *domain, DOM_SID *sid)
retry = 0;
do {
/* Get lsa handle */
- if (!NT_STATUS_IS_OK(result = cm_get_lsa_handle(domain->name, &hnd)))
+ if (!NT_STATUS_IS_OK(result = cm_get_lsa_handle(domain, &hnd)))
goto done;
result = cli_lsa_query_info_policy(hnd->cli, mem_ctx,