cred->forced_sasl_mech = NULL;
+ cred->winbind_separator = '\\';
+
return cred;
}
*p = 0;
cli_credentials_set_realm(credentials, p+1, obtained);
return;
- } else if ((p = strchr_m(uname,'\\')) || (p = strchr_m(uname, '/'))) {
+ } else if ((p = strchr_m(uname,'\\'))
+ || (p = strchr_m(uname, '/'))
+ || (p = strchr_m(uname, credentials->winbind_separator)))
+ {
*p = 0;
cli_credentials_set_domain(credentials, uname, obtained);
uname = p+1;
_PUBLIC_ void cli_credentials_set_conf(struct cli_credentials *cred,
struct loadparm_context *lp_ctx)
{
+ const char *sep = NULL;
+
cli_credentials_set_username(cred, "", CRED_UNINITIALISED);
if (lpcfg_parm_is_cmdline(lp_ctx, "workgroup")) {
cli_credentials_set_domain(cred, lpcfg_workgroup(lp_ctx), CRED_SPECIFIED);
} else {
cli_credentials_set_realm(cred, lpcfg_realm(lp_ctx), CRED_UNINITIALISED);
}
+
+ sep = lpcfg_winbind_separator(lp_ctx);
+ if (sep != NULL && sep[0] != '\0') {
+ cred->winbind_separator = *lpcfg_winbind_separator(lp_ctx);
+ }
}
/**