sshsrv.c revision 909a86af4eb99f5d311d7136cab78dca535ae304
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen Jan Cholasta <jcholast@redhat.com>
b215a8a123623782554a83f3025ef4e771bd8f01Timo Sirainen Copyright (C) 2012 Red Hat
2615df45a8027948a474abe5e817b34b0499c171Timo Sirainen This program is free software; you can redistribute it and/or modify
b780aa272b742a43579cdb523cc79cc8d4521306Timo Sirainen it under the terms of the GNU General Public License as published by
b9f564d00b7a115f465ffd6840341c7b8f9bfc8aTimo Sirainen the Free Software Foundation; either version 3 of the License, or
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen (at your option) any later version.
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen This program is distributed in the hope that it will be useful,
b215a8a123623782554a83f3025ef4e771bd8f01Timo Sirainen but WITHOUT ANY WARRANTY; without even the implied warranty of
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9f0f2de10e4ea0c99052bf4b2bef8179f2536228Timo Sirainen GNU General Public License for more details.
9f0f2de10e4ea0c99052bf4b2bef8179f2536228Timo Sirainen You should have received a copy of the GNU General Public License
f9007013ea59b844e95fe32022eaf8852ba7e5a6Timo Sirainen along with this program. If not, see <http://www.gnu.org/licenses/>.
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen { MON_CLI_METHOD_RES_INIT, monitor_common_res_init },
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen { MON_CLI_METHOD_ROTATE, responder_logrotate },
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainenstruct sbus_interface monitor_ssh_interface = {
b215a8a123623782554a83f3025ef4e771bd8f01Timo Sirainenstatic void ssh_dp_reconnect_init(struct sbus_connection *conn,
f9007013ea59b844e95fe32022eaf8852ba7e5a6Timo Sirainen struct be_conn *be_conn = talloc_get_type(pvt, struct be_conn);
f9007013ea59b844e95fe32022eaf8852ba7e5a6Timo Sirainen /* Did we reconnect successfully? */
f9007013ea59b844e95fe32022eaf8852ba7e5a6Timo Sirainen DEBUG(SSSDBG_TRACE_FUNC, ("Reconnected to the Data Provider.\n"));
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen /* Identify ourselves to the data provider */
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen /* all fine */
b215a8a123623782554a83f3025ef4e771bd8f01Timo Sirainen handle_requests_after_reconnect(be_conn->rctx);
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen /* Failed to reconnect */
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen DEBUG(SSSDBG_FATAL_FAILURE, ("Could not reconnect to %s provider.\n",
f9007013ea59b844e95fe32022eaf8852ba7e5a6Timo Sirainen DEBUG(SSSDBG_FATAL_FAILURE, ("sss_process_init() failed\n"));
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen DEBUG(SSSDBG_FATAL_FAILURE, ("fatal error initializing ssh_ctx\n"));
9f0f2de10e4ea0c99052bf4b2bef8179f2536228Timo Sirainen "(?P<name>[^@]+)@?(?P<domain>[^@]*$)",
f9007013ea59b844e95fe32022eaf8852ba7e5a6Timo Sirainen DEBUG(SSSDBG_FATAL_FAILURE, ("fatal error initializing regex data\n"));
9f0f2de10e4ea0c99052bf4b2bef8179f2536228Timo Sirainen /* Enable automatic reconnection to the Data Provider */
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen ("Failed to set up automatic reconnection\n"));
1cfdcb36985904eff281fc6d7ea2d13b3c375980Timo Sirainen for (iter = ssh_ctx->rctx->be_conns; iter; iter = iter->next) {
12ab808b472ed51923945efac4156a380bd58d57Timo Sirainen /* Get responder options */
goto fail;
goto fail;
goto fail;
return EOK;
fail:
return ret;
int opt;
int ret;
switch(opt) {