summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/uid.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c
index 1d2b8f4e9f..db43106b77 100644
--- a/source3/smbd/uid.c
+++ b/source3/smbd/uid.c
@@ -271,6 +271,7 @@ void unbecome_root(void)
BOOL lookup_name(char *name, DOM_SID *psid, enum SID_NAME_USE *name_type)
{
extern pstring global_myname;
+ extern fstring global_myworkgroup;
fstring sid;
char *sep = lp_winbind_separator();
@@ -287,9 +288,17 @@ BOOL lookup_name(char *name, DOM_SID *psid, enum SID_NAME_USE *name_type)
split_domain_name(name, domain, username);
- if (strcasecmp(global_myname, domain) != 0) {
- DEBUG(5, ("domain %s is not local\n", domain));
- return False;
+ switch (lp_server_role()) {
+ case ROLE_DOMAIN_PDC:
+ case ROLE_DOMAIN_BDC:
+ if (strequal(domain, global_myworkgroup))
+ fstrcpy(domain, global_myname);
+ /* No break is deliberate here. JRA. */
+ default:
+ if (strcasecmp(global_myname, domain) != 0) {
+ DEBUG(5, ("domain %s is not local\n", domain));
+ return False;
+ }
}
ret = local_lookup_name(domain, username, psid,