summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-05-09 05:06:35 +0000
committerTim Potter <tpot@samba.org>2001-05-09 05:06:35 +0000
commit014859b62b31ceff5b5ca3d1699792e362c77a85 (patch)
treee6323fe08e7effaf4c06ad80a5ae378e60abdf6a /source
parentfc44cec0de68c92001c4313b4f0ee9f69ba6b9b5 (diff)
downloadsamba-014859b62b31ceff5b5ca3d1699792e362c77a85.tar.gz
samba-014859b62b31ceff5b5ca3d1699792e362c77a85.tar.xz
samba-014859b62b31ceff5b5ca3d1699792e362c77a85.zip
Fixes from nsswitch testsuite. Lots of stuff works much better now. (-:
Diffstat (limited to 'source')
-rw-r--r--source/nsswitch/winbindd_glue.c2
-rw-r--r--source/nsswitch/winbindd_user.c2
-rw-r--r--source/nsswitch/winbindd_util.c11
3 files changed, 9 insertions, 6 deletions
diff --git a/source/nsswitch/winbindd_glue.c b/source/nsswitch/winbindd_glue.c
index 6f55e564f41..ac48ae10134 100644
--- a/source/nsswitch/winbindd_glue.c
+++ b/source/nsswitch/winbindd_glue.c
@@ -306,7 +306,7 @@ BOOL wb_get_samr_query_userinfo(CLI_POLICY_HND *pol, uint32 info_level,
done:
if (got_user_pol) cli_samr_close(pol->cli, pol->mem_ctx, &user_pol);
- return (result != NT_STATUS_NOPROBLEMO);
+ return (result == NT_STATUS_NOPROBLEMO);
}
/****************************************************************************
diff --git a/source/nsswitch/winbindd_user.c b/source/nsswitch/winbindd_user.c
index f23593db887..43227b9dc1e 100644
--- a/source/nsswitch/winbindd_user.c
+++ b/source/nsswitch/winbindd_user.c
@@ -157,6 +157,8 @@ enum winbindd_result winbindd_getpwnam_from_user(struct winbindd_cli_state
/* The following costs 3 packets */
+ ZERO_STRUCT(user_info);
+
if (!winbindd_lookup_userinfo(domain, user_rid, &user_info)) {
DEBUG(1, ("pwnam_from_user(): error getting user info for "
"user '%s'\n", name_user));
diff --git a/source/nsswitch/winbindd_util.c b/source/nsswitch/winbindd_util.c
index 3d8fbd3da82..6026422c30d 100644
--- a/source/nsswitch/winbindd_util.c
+++ b/source/nsswitch/winbindd_util.c
@@ -310,7 +310,7 @@ static BOOL get_any_dc_name(char *domain, fstring srv_name)
/* Lookup domain controller name */
- if (!get_dc_list(False, lp_workgroup(), &ip_list, &count))
+ if (!get_dc_list(False, domain, &ip_list, &count))
return False;
/* Firstly choose a PDC/BDC who has the same network address as any
@@ -327,7 +327,7 @@ static BOOL get_any_dc_name(char *domain, fstring srv_name)
dc_ip = ip_list[i];
free(ip_list);
- if (!lookup_pdc_name(global_myname, lp_workgroup(), &dc_ip, srv_name))
+ if (!lookup_pdc_name(global_myname, domain, &dc_ip, srv_name))
return False;
return True;
@@ -430,8 +430,9 @@ BOOL lookup_domain_sid(char *domain_name, struct winbindd_domain *domain)
return False;
}
- if (strequal(domain->controller, server_state.controller)) {
- /* Do a level 5 query info policy */
+ /* Do a level 5 query info policy if we are looking up our own SID */
+
+ if (strequal(domain_name, lp_workgroup())) {
return wb_lsa_query_info_pol(&server_state.lsa_handle, 0x05,
level5_dom, &domain->sid);
}
@@ -443,7 +444,7 @@ BOOL lookup_domain_sid(char *domain_name, struct winbindd_domain *domain)
/* Look for domain name */
- if (!res && domains && sids) {
+ if (res && domains && sids) {
int found = False;
int i;