diff options
author | Jim McDonough <jmcd@samba.org> | 2004-04-06 22:02:47 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:51:08 -0500 |
commit | ddc0716fa88bcef0dfe2396ad4b93a5904629d71 (patch) | |
tree | f1fe9807c08a56c4bad1ada0a69ccecde84f6f7a /source3 | |
parent | d2b58ab66f049fa33130673253ceca68774efdec (diff) | |
download | samba-ddc0716fa88bcef0dfe2396ad4b93a5904629d71.tar.gz samba-ddc0716fa88bcef0dfe2396ad4b93a5904629d71.tar.bz2 samba-ddc0716fa88bcef0dfe2396ad4b93a5904629d71.zip |
r91: Fix lsalookupnames. Previously we'd fail if we didn't find the name, but
we never checked if it was a domain user and didn't find a local one.
(This used to be commit 68022f5ebc55d1f3403dee5198d364cff300baf5)
Diffstat (limited to 'source3')
-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")); |