sshsrv.c revision e7311aec8d691e5427317442387af1bc8fff3742
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce Jan Cholasta <jcholast@redhat.com>
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce Copyright (C) 2012 Red Hat
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce This program is free software; you can redistribute it and/or modify
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce it under the terms of the GNU General Public License as published by
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce the Free Software Foundation; either version 3 of the License, or
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce (at your option) any later version.
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce This program is distributed in the hope that it will be useful,
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce but WITHOUT ANY WARRANTY; without even the implied warranty of
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce GNU General Public License for more details.
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce You should have received a copy of the GNU General Public License
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce along with this program. If not, see <http://www.gnu.org/licenses/>.
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce { MON_CLI_METHOD_RES_INIT, monitor_common_res_init },
c6872e79e8496fd075e20aec0343ade99cca725cSimo Sorcestatic void ssh_dp_reconnect_init(struct sbus_connection *conn,
7c69221077c780e62f6c536e78675f2dc1c131bcMichal Zidek struct be_conn *be_conn = talloc_get_type(pvt, struct be_conn);
ab967283b710dfa05d11ee5b30c7ac916486ceecSimo Sorce /* Did we reconnect successfully? */
ab967283b710dfa05d11ee5b30c7ac916486ceecSimo Sorce DEBUG(SSSDBG_TRACE_FUNC, ("Reconnected to the Data Provider.\n"));
c6872e79e8496fd075e20aec0343ade99cca725cSimo Sorce /* Identify ourselves to the data provider */
c9b0071bfcb8eb8c71e40248de46d23aceecc0f3Pavel Reichl /* all fine */
9cb46bc62f22e0104f1b41a423b014c281ef5fc2Jakub Hrozek /* Failed to reconnect */
9cb46bc62f22e0104f1b41a423b014c281ef5fc2Jakub Hrozek DEBUG(SSSDBG_FATAL_FAILURE, ("Could not reconnect to %s provider.\n",
a2ea3f5d9ef9f17efbb61e942c2bc6cff7d1ebf2Jakub Hrozek DEBUG(SSSDBG_FATAL_FAILURE, ("fatal error initializing ssh_ctx\n"));
e732d23f3ec986a463d757781a334040e03d1f59Jakub Hrozek /* Enable automatic reconnection to the Data Provider */
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce ret = confdb_get_int(ssh_ctx->rctx->cdb, ssh_ctx->rctx,
7650ded4ffa87fcf7ce5adf00920fecf89cffcf5Michal Zidek ("Failed to set up automatic reconnection\n"));
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce for (iter = ssh_ctx->rctx->be_conns; iter; iter = iter->next) {
8bcabb97d988d1602882a1f036aac2eaf5e09234Simo Sorce DEBUG(SSSDBG_TRACE_FUNC, ("SSH Initialization complete\n"));
int ret;
switch(opt) {