summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/nsswitch/winbindd_cache.c2
-rw-r--r--source3/nsswitch/winbindd_group.c8
-rw-r--r--source3/nsswitch/winbindd_pam.c2
-rw-r--r--source3/nsswitch/winbindd_user.c6
-rw-r--r--source3/nsswitch/winbindd_util.c4
5 files changed, 14 insertions, 8 deletions
diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c
index b999e8d9ce..b6b753bae0 100644
--- a/source3/nsswitch/winbindd_cache.c
+++ b/source3/nsswitch/winbindd_cache.c
@@ -303,7 +303,7 @@ static BOOL fetch_cache_entry(char *domain, char *cache_type, char *name, void *
data = tdb_fetch_by_string(cache_tdb, keystr);
if (!data.dptr) return False;
- DEBUG(4, ("returning cached entry for %s/%s\n", domain, name));
+ DEBUG(4, ("returning cached entry for %s\\%s\n", domain, name));
/* Copy found entry into buffer */
memcpy((char *)buf, data.dptr, len < data.dsize ? len : data.dsize);
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c
index db94bab836..e96947b7e6 100644
--- a/source3/nsswitch/winbindd_group.c
+++ b/source3/nsswitch/winbindd_group.c
@@ -271,7 +271,7 @@ static BOOL winbindd_fill_grent_mem(struct winbindd_domain *domain,
/* Create name */
slprintf(entry->name, sizeof(entry->name),
- "%s/%s", name_dom, name_user);
+ "%s%s%s", name_dom, lp_winbind_separator(), name_user);
/* Add to list */
@@ -562,7 +562,9 @@ enum winbindd_result winbindd_getgrnam_from_gid(struct winbindd_cli_state
return WINBINDD_ERROR;
}
- string_sub(group_name, "\\", "/", sizeof(fstring));
+ if (strcmp(lp_winbind_separator(),"\\")) {
+ string_sub(group_name, "\\", lp_winbind_separator(), sizeof(fstring));
+ }
if (!((name_type == SID_NAME_ALIAS) || (name_type == SID_NAME_DOM_GRP))) {
DEBUG(1, ("from_gid: name '%s' is not a local or domain group: %d\n",
@@ -716,7 +718,7 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state)
/* Prepend domain to name */
slprintf(domain_group_name, sizeof(domain_group_name),
- "%s/%s", ent->domain->name, group_name);
+ "%s%s%s", ent->domain->name, lp_winbind_separator(), group_name);
/* Get group entry from group name */
diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c
index 011fbedb97..656fb74964 100644
--- a/source3/nsswitch/winbindd_pam.c
+++ b/source3/nsswitch/winbindd_pam.c
@@ -76,7 +76,7 @@ enum winbindd_result winbindd_pam_auth(struct winbindd_cli_state *state)
ZERO_STRUCT(info3);
- if (!_get_trust_account_password(name_domain, trust_passwd, NULL)) return WINBINDD_ERROR;
+ if (!_get_trust_account_password(lp_workgroup(), trust_passwd, NULL)) return WINBINDD_ERROR;
nt_lm_owf_gen(state->request.data.auth.pass, ntpw, lmpw);
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 */
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index daffb1ef8c..1eea8f8fc7 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -619,7 +619,9 @@ char *winbindd_cmd_to_string(enum winbindd_cmd cmd)
void parse_domain_user(char *domuser, fstring domain, fstring user)
{
char *p;
- p = strchr(domuser,'/');
+ char *sep = lp_winbind_separator();
+ if (!sep) sep = "\\";
+ p = strchr(domuser,*sep);
if (!p) p = strchr(domuser,'\\');
if (!p) {
fstrcpy(domain,"");