diff options
author | Anatoliy Atanasov <anatoliy.atanasov@postpath.com> | 2009-09-23 16:52:34 -0700 |
---|---|---|
committer | Anatoliy Atanasov <anatoliy.atanasov@postpath.com> | 2009-09-23 17:10:21 -0700 |
commit | 23e4470c31a1800065830205241295344057ca01 (patch) | |
tree | 6e6e8cb4522b7f62ecd1d692e194eaf76219ccdf | |
parent | 97a9ae15b581be85bec260b3875343811f315fe6 (diff) | |
download | samba-23e4470c31a1800065830205241295344057ca01.tar.gz samba-23e4470c31a1800065830205241295344057ca01.tar.bz2 samba-23e4470c31a1800065830205241295344057ca01.zip |
s4: Handle DRSUAPI_DS_REPLICA_NEIGHBOUR_ASYNC_REP in getncchanges
When this flag is specified in the request we should return
for ncRoot only and so scope of search is LDB_SCOPE_BASE.
-rw-r--r-- | source4/rpc_server/drsuapi/getncchanges.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c index 22e82fb4e8..75f6213963 100644 --- a/source4/rpc_server/drsuapi/getncchanges.c +++ b/source4/rpc_server/drsuapi/getncchanges.c @@ -307,6 +307,7 @@ WERROR dcesrv_drsuapi_DsGetNCChanges(struct dcesrv_call_state *dce_call, TALLOC_ const char *attrs[] = { "*", "parentGUID", "distinguishedName", NULL }; WERROR werr; char* search_filter; + enum ldb_scope scope = LDB_SCOPE_SUBTREE; *r->out.level_out = 6; /* TODO: linked attributes*/ @@ -372,9 +373,14 @@ WERROR dcesrv_drsuapi_DsGetNCChanges(struct dcesrv_call_state *dce_call, TALLOC_ "(&%s(isCriticalSystemObject=true))", search_filter); } + ncRoot_dn = ldb_dn_new(mem_ctx, sam_ctx, ncRoot->dn); + if ((r->in.req->req8.replica_flags & DRSUAPI_DS_REPLICA_NEIGHBOUR_ASYNC_REP) + == DRSUAPI_DS_REPLICA_NEIGHBOUR_ASYNC_REP) { + scope = LDB_SCOPE_BASE; + } ret = drsuapi_search_with_extended_dn(sam_ctx, mem_ctx, &site_res, - ncRoot_dn, LDB_SCOPE_SUBTREE, attrs, + ncRoot_dn, scope, attrs, "distinguishedName", search_filter); if (ret != LDB_SUCCESS) { |