diff options
-rw-r--r-- | source3/lib/util_sid.c | 7 | ||||
-rw-r--r-- | source3/rpc_server/srv_lsa_nt.c | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c index 50bbb4c72c..e317f8f84e 100644 --- a/source3/lib/util_sid.c +++ b/source3/lib/util_sid.c @@ -201,6 +201,13 @@ void split_domain_name(const char *fullname, char *domain, char *name) fstrcpy(domain, full_name); fstrcpy(name, p+1); } else { + if(!lp_domain_logons()) { + fstrcpy(domain, global_myname()); + fstrcpy(name, full_name); + } else { + fstrcpy(domain, lp_workgroup()); + fstrcpy(name, full_name); + } fstrcpy(domain, global_myname()); fstrcpy(name, full_name); } diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c index 07c024e1ca..9801ce47f8 100644 --- a/source3/rpc_server/srv_lsa_nt.c +++ b/source3/rpc_server/srv_lsa_nt.c @@ -165,6 +165,12 @@ static void init_lsa_rid2s(DOM_R_REF *ref, DOM_RID2 *rid2, status = lookup_name(dom_name, user, &sid, &name_type); + if((name_type == SID_NAME_UNKNOWN) && (lp_server_role() == ROLE_DOMAIN_MEMBER) && (strncmp(dom_name, full_name, strlen(dom_name)) != 0)) { + DEBUG(5, ("init_lsa_rid2s: domain name not provided and local account not found, using member domain\n")); + fstrcpy(dom_name, lp_workgroup()); + status = lookup_name(dom_name, user, &sid, &name_type); + } + DEBUG(5, ("init_lsa_rid2s: %s\n", status ? "found" : "not found")); |