1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

use "winbind separator" in tng as well

This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent 11328f2781
commit 0189af5442
5 changed files with 14 additions and 8 deletions

View File

@ -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);

View File

@ -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 */

View File

@ -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);

View File

@ -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 */

View File

@ -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,"");