summaryrefslogtreecommitdiff
path: root/source4/rpc_server/samr
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-06-06 12:51:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:53:12 -0500
commitc74ad3546c57bef9b324a324585431081c5cbf30 (patch)
tree6b6bcf57b535e979ac852a137ee0e4d5bcfa96e4 /source4/rpc_server/samr
parentd89e6c774bbf6738183459c52acbd3220482d58a (diff)
downloadsamba-c74ad3546c57bef9b324a324585431081c5cbf30.tar.gz
samba-c74ad3546c57bef9b324a324585431081c5cbf30.tar.bz2
samba-c74ad3546c57bef9b324a324585431081c5cbf30.zip
r23365: Try to make Windows Vista join again. On my new test environment, it
wants to check for an existing domain join account, and fails. This test shows that we need to return NT_STATUS_NONE_MAPPED when nothing matches. (not yet tested if this helps vista). Andrew Bartlett (This used to be commit 7f3671bf11cab36a5c795d7db86f85081b73bc71)
Diffstat (limited to 'source4/rpc_server/samr')
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index 73b740e466..4bc03cc647 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -1783,7 +1783,7 @@ static NTSTATUS dcesrv_samr_LookupNames(struct dcesrv_call_state *dce_call, TALL
{
struct dcesrv_handle *h;
struct samr_domain_state *d_state;
- int i;
+ int i, num_mapped;
NTSTATUS status = NT_STATUS_OK;
const char * const attrs[] = { "sAMAccountType", "objectSid", NULL };
int count;
@@ -1807,6 +1807,8 @@ static NTSTATUS dcesrv_samr_LookupNames(struct dcesrv_call_state *dce_call, TALL
r->out.rids.count = r->in.num_names;
r->out.types.count = r->in.num_names;
+ num_mapped = 0;
+
for (i=0;i<r->in.num_names;i++) {
struct ldb_message **res;
struct dom_sid *sid;
@@ -1844,9 +1846,12 @@ static NTSTATUS dcesrv_samr_LookupNames(struct dcesrv_call_state *dce_call, TALL
r->out.rids.ids[i] = sid->sub_auths[sid->num_auths-1];
r->out.types.ids[i] = rtype;
+ num_mapped++;
}
-
+ if (num_mapped == 0) {
+ return NT_STATUS_NONE_MAPPED;
+ }
return status;
}