summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2004-04-06 22:02:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:08 -0500
commitddc0716fa88bcef0dfe2396ad4b93a5904629d71 (patch)
treef1fe9807c08a56c4bad1ada0a69ccecde84f6f7a /source3/rpc_server
parentd2b58ab66f049fa33130673253ceca68774efdec (diff)
downloadsamba-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/rpc_server')
-rw-r--r--source3/rpc_server/srv_lsa_nt.c6
1 files changed, 6 insertions, 0 deletions
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"));