mirror of
https://github.com/samba-team/samba.git
synced 2025-03-11 16:58:40 +03:00
s4-kcc: Remove nonfunctional fallback code
The following line in the pre‐2003 attributes fallback code: attrs = post_2003_attrs; presumably should have read attrs = pre_2003_attrs; As it is this fallback, added in commit 2fc233b78f35e4bc5062869d77985567d61d0f8a and subsequently modified in commit 783ff68628fee6d5681b3a9abd80b74a78588926, does not do what it was intended to do. Besides, attempting a failed search again, just with different attributes, will presumably not yield any more of a result. Signed-off-by: Jo Sutton <josutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
parent
9e7c37550a
commit
7b02049223
@ -386,9 +386,7 @@ struct ncList {
|
||||
static WERROR get_master_ncs(TALLOC_CTX *mem_ctx, struct ldb_context *samdb,
|
||||
const char *ntds_guid_str, struct ncList **master_nc_list)
|
||||
{
|
||||
const char *post_2003_attrs[] = { "msDS-hasMasterNCs", "hasPartialReplicaNCs", NULL };
|
||||
const char *pre_2003_attrs[] = { "hasMasterNCs", "hasPartialReplicaNCs", NULL };
|
||||
const char **attrs = post_2003_attrs;
|
||||
const char *attrs[] = { "msDS-hasMasterNCs", "hasPartialReplicaNCs", NULL };
|
||||
struct ldb_result *res;
|
||||
struct ncList *nc_list = NULL;
|
||||
struct ncList *nc_list_elem;
|
||||
@ -398,15 +396,7 @@ static WERROR get_master_ncs(TALLOC_CTX *mem_ctx, struct ldb_context *samdb,
|
||||
|
||||
/* In W2003 and greater, msDS-hasMasterNCs attribute lists the writable NC replicas */
|
||||
ret = ldb_search(samdb, mem_ctx, &res, ldb_get_config_basedn(samdb),
|
||||
LDB_SCOPE_DEFAULT, post_2003_attrs, "(objectguid=%s)", ntds_guid_str);
|
||||
|
||||
if (ret != LDB_SUCCESS) {
|
||||
DEBUG(0,(__location__ ": Failed objectguid search - %s\n", ldb_errstring(samdb)));
|
||||
|
||||
attrs = post_2003_attrs;
|
||||
ret = ldb_search(samdb, mem_ctx, &res, ldb_get_config_basedn(samdb),
|
||||
LDB_SCOPE_DEFAULT, pre_2003_attrs, "(objectguid=%s)", ntds_guid_str);
|
||||
}
|
||||
LDB_SCOPE_DEFAULT, attrs, "(objectguid=%s)", ntds_guid_str);
|
||||
|
||||
if (ret != LDB_SUCCESS) {
|
||||
DEBUG(0,(__location__ ": Failed objectguid search - %s\n", ldb_errstring(samdb)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user