summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-10-20 15:13:56 +0200
committerGünther Deschner <gd@samba.org>2009-10-20 15:28:31 +0200
commit1f4d26c4870989c5a0aba773c97172f0c0185aba (patch)
treee23661a1479c742e534d82e750422f3b6c832011 /source3
parent18dd62616028cf202f63a12c20d5e21e390451b6 (diff)
downloadsamba-1f4d26c4870989c5a0aba773c97172f0c0185aba.tar.gz
samba-1f4d26c4870989c5a0aba773c97172f0c0185aba.tar.bz2
samba-1f4d26c4870989c5a0aba773c97172f0c0185aba.zip
s3-lsa: allow to lookup BUILTIN\ in lsa_LookupNames.
Found by RPC-LSA-LOOKUPNAMES torture test. Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/passdb/lookup_sid.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c
index 4f8d6a4759..1fcd94c059 100644
--- a/source3/passdb/lookup_sid.c
+++ b/source3/passdb/lookup_sid.c
@@ -86,6 +86,14 @@ bool lookup_name(TALLOC_CTX *mem_ctx,
if ((flags & LOOKUP_NAME_BUILTIN) &&
strequal(domain, builtin_domain_name()))
{
+ if (strlen(name) == 0) {
+ /* Swap domain and name */
+ tmp = name; name = domain; domain = tmp;
+ sid_copy(&sid, &global_sid_Builtin);
+ type = SID_NAME_DOMAIN;
+ goto ok;
+ }
+
/* Explicit request for a name in BUILTIN */
if (lookup_builtin_name(name, &rid)) {
sid_copy(&sid, &global_sid_Builtin);