char *qualified_name;
/* NB. No winbindd_separator here as lookup_name needs \\' */
- if (strchr_m(full_name, '\\')) {
+ if (strchr_m(full_name, *lp_winbind_separator())) {
+
/* The name is already qualified with a domain. */
+
+ if (*lp_winbind_separator() != '\\') {
+ char *p, *tmp;
+
+ /* lookup_name() needs '\\' as a separator */
+
+ tmp = talloc_strdup(mem_ctx, full_name);
+ if (!tmp) {
+ return False;
+ }
+ p = strchr_m(tmp, *lp_winbind_separator());
+ SMB_ASSERT(p != NULL);
+ *p = '\\';
+ full_name = tmp;
+ }
+
return lookup_name(mem_ctx, full_name, flags,
ret_domain, ret_name,
ret_sid, ret_type);
}
if (!do_group_checks(&name, &prefix)) {
- if (!lookup_name(mem_ctx, name, LOOKUP_NAME_ALL,
+ if (!lookup_name_smbconf(mem_ctx, name, LOOKUP_NAME_ALL,
NULL, NULL, &sid, &type)) {
DEBUG(5, ("lookup_name %s failed\n", name));
return False;
for (/* initialized above */ ; *prefix != '\0'; prefix++) {
if (*prefix == '+') {
- if (!lookup_name(mem_ctx, name,
+ if (!lookup_name_smbconf(mem_ctx, name,
LOOKUP_NAME_ALL|LOOKUP_NAME_GROUP,
NULL, NULL, &sid, &type)) {
DEBUG(5, ("lookup_name %s failed\n", name));