mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
replica install fails with domain level 1
when updating an replication agreement from a toplogy segment an incorrect default value was used for bindmethod.
Only attributes explicitely set in the segment should be applied.
At shutdown the server could crash because the plugin was called after it was stopped.
https://fedorahosted.org/freeipa/ticket/5035
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
This commit is contained in:
committed by
Petr Vobornik
parent
af8f44c86a
commit
faa4d0b6ea
@@ -70,7 +70,8 @@ int
|
|||||||
ipa_topo_agmt_new(char *hostname, TopoReplica *conf, TopoReplicaAgmt *agmt)
|
ipa_topo_agmt_new(char *hostname, TopoReplica *conf, TopoReplicaAgmt *agmt)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
if (strcasecmp(agmt->repl_bind_method,"SASL/GSSAPI") == 0) {
|
if ((agmt->repl_bind_method == NULL) /* use GSSAPI as default */ ||
|
||||||
|
(strcasecmp(agmt->repl_bind_method,"SASL/GSSAPI") == 0)) {
|
||||||
ret = ipa_topo_agmt_setup(hostname, conf, agmt, 1);
|
ret = ipa_topo_agmt_setup(hostname, conf, agmt, 1);
|
||||||
} else {
|
} else {
|
||||||
ret = ipa_topo_agmt_setup(hostname, conf, agmt, 0);
|
ret = ipa_topo_agmt_setup(hostname, conf, agmt, 0);
|
||||||
|
|||||||
@@ -225,12 +225,12 @@ static int
|
|||||||
ipa_topo_close(Slapi_PBlock * pb)
|
ipa_topo_close(Slapi_PBlock * pb)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
ipa_topo_set_plugin_active(0);
|
||||||
slapi_config_remove_callback(SLAPI_OPERATION_SEARCH, DSE_FLAG_PREOP,
|
slapi_config_remove_callback(SLAPI_OPERATION_SEARCH, DSE_FLAG_PREOP,
|
||||||
"", LDAP_SCOPE_BASE, "(objectclass=*)", ipa_topo_rootdse_search);
|
"", LDAP_SCOPE_BASE, "(objectclass=*)", ipa_topo_rootdse_search);
|
||||||
slapi_unregister_backend_state_change((void *)ipa_topo_be_state_change);
|
slapi_unregister_backend_state_change((void *)ipa_topo_be_state_change);
|
||||||
ipa_topo_free_plugin_config();
|
ipa_topo_free_plugin_config();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
static int
|
static int
|
||||||
ipa_topo_rootdse_init(Slapi_PBlock *pb)
|
ipa_topo_rootdse_init(Slapi_PBlock *pb)
|
||||||
|
|||||||
@@ -329,9 +329,6 @@ ipa_topo_util_agmt_from_entry(Slapi_Entry *entry, char *replRoot, char *fromHost
|
|||||||
ipa_topo_util_set_segm_attr(agmt, mattrs[i], mval);
|
ipa_topo_util_set_segm_attr(agmt, mattrs[i], mval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (agmt->repl_bind_method == NULL) {
|
|
||||||
agmt->repl_bind_method = slapi_ch_strdup("SASL/GSSAPI");
|
|
||||||
}
|
|
||||||
return agmt;
|
return agmt;
|
||||||
}
|
}
|
||||||
TopoReplicaSegment *
|
TopoReplicaSegment *
|
||||||
|
|||||||
Reference in New Issue
Block a user