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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/nsswitch/winbindd_user.c b/source3/nsswitch/winbindd_user.c
index 3e7cba0118..9a73b0107b 100644
--- a/source3/nsswitch/winbindd_user.c
+++ b/source3/nsswitch/winbindd_user.c
@@ -207,7 +207,9 @@ enum winbindd_result winbindd_getpwnam_from_uid(struct winbindd_cli_state
return WINBINDD_ERROR;
}
- string_sub(user_name, "\\", "/", sizeof(fstring));
+ if (strcmp("\\", lp_winbind_separator())) {
+ string_sub(user_name, "\\", lp_winbind_separator(), sizeof(fstring));
+ }
/* Get some user info */
@@ -363,7 +365,7 @@ enum winbindd_result winbindd_getpwent(struct winbindd_cli_state *state)
/* Prepend domain to name */
slprintf(domain_user_name, sizeof(domain_user_name),
- "%s/%s", ent->domain->name, user_name);
+ "%s%s%s", ent->domain->name, lp_winbind_separator(), user_name);
/* Get passwd entry from user name */