diff options
author | Tim Potter <tpot@samba.org> | 2001-05-09 05:06:35 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-05-09 05:06:35 +0000 |
commit | bc776832834c2c973c6714c66901fe22f0679962 (patch) | |
tree | 772414fe8cb7ac584cfd4b73fc19763c160e9ebc /source3/nsswitch | |
parent | 989ece4b265d7ea8379aa9c1899c59aadf8bd120 (diff) | |
download | samba-bc776832834c2c973c6714c66901fe22f0679962.tar.gz samba-bc776832834c2c973c6714c66901fe22f0679962.tar.xz samba-bc776832834c2c973c6714c66901fe22f0679962.zip |
Fixes from nsswitch testsuite. Lots of stuff works much better now. (-:
(This used to be commit 014859b62b31ceff5b5ca3d1699792e362c77a85)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r-- | source3/nsswitch/winbindd_glue.c | 2 | ||||
-rw-r--r-- | source3/nsswitch/winbindd_user.c | 2 | ||||
-rw-r--r-- | source3/nsswitch/winbindd_util.c | 11 |
3 files changed, 9 insertions, 6 deletions
diff --git a/source3/nsswitch/winbindd_glue.c b/source3/nsswitch/winbindd_glue.c index 6f55e564f41..ac48ae10134 100644 --- a/source3/nsswitch/winbindd_glue.c +++ b/source3/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/source3/nsswitch/winbindd_user.c b/source3/nsswitch/winbindd_user.c index f23593db887..43227b9dc1e 100644 --- a/source3/nsswitch/winbindd_user.c +++ b/source3/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/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index 3d8fbd3da82..6026422c30d 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/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; |