summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nsswitch/winbindd_user.c')
-rw-r--r--source3/nsswitch/winbindd_user.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/nsswitch/winbindd_user.c b/source3/nsswitch/winbindd_user.c
index d192793993..d8d7dbb502 100644
--- a/source3/nsswitch/winbindd_user.c
+++ b/source3/nsswitch/winbindd_user.c
@@ -324,7 +324,7 @@ enum winbindd_result winbindd_getpwnam(struct winbindd_cli_state *state)
/* Get info for the domain */
- domain = find_lookup_domain_from_name(domname);
+ domain = find_domain_from_name(domname);
if (domain == NULL) {
DEBUG(7, ("could not find domain entry for domain %s\n",
@@ -332,9 +332,9 @@ enum winbindd_result winbindd_getpwnam(struct winbindd_cli_state *state)
return WINBINDD_ERROR;
}
- if ( domain->primary && lp_winbind_trusted_domains_only()) {
- DEBUG(7,("winbindd_getpwnam: My domain -- rejecting "
- "getgroups() for %s\\%s.\n", domname, username));
+ if ( strequal(domname, lp_workgroup()) && lp_winbind_trusted_domains_only() ) {
+ DEBUG(7,("winbindd_getpwnam: My domain -- rejecting getpwnam() for %s\\%s.\n",
+ domname, username));
return WINBINDD_ERROR;
}