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.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/source3/nsswitch/winbindd_user.c b/source3/nsswitch/winbindd_user.c
index c8d9ce299f..52122a4f29 100644
--- a/source3/nsswitch/winbindd_user.c
+++ b/source3/nsswitch/winbindd_user.c
@@ -65,7 +65,10 @@ static BOOL winbindd_fill_pwent(char *domain_name, char *name,
defaults are /tmp for the home directory and /bin/false for
shell. */
- parse_domain_user(name, name_domain, name_user);
+ if (!parse_domain_user(name, name_domain, name_user)) {
+ DEBUG(1, ("error parsing domain user for %s\n", name_user ));
+ return False;
+ }
/* The substitution of %U and %D in the 'template homedir' is done
by lp_string() calling standard_sub_basic(). */
@@ -113,13 +116,8 @@ enum winbindd_result winbindd_getpwnam_from_user(struct winbindd_cli_state *stat
/* Parse domain and username */
- parse_domain_user(state->request.data.username, name_domain,
- name_user);
-
- /* Reject names that don't have a domain - i.e name_domain contains
- the entire name. */
-
- if (strequal(name_domain, ""))
+ if (!parse_domain_user(state->request.data.username, name_domain,
+ name_user))
return WINBINDD_ERROR;
if ((domain = find_domain_from_name(name_domain)) == NULL) {