e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta Jan Cholasta <jcholast@redhat.com>
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta Copyright (C) 2012 Red Hat
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta This program is free software; you can redistribute it and/or modify
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta it under the terms of the GNU General Public License as published by
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta the Free Software Foundation; either version 3 of the License, or
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta (at your option) any later version.
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta This program is distributed in the hope that it will be useful,
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta but WITHOUT ANY WARRANTY; without even the implied warranty of
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta GNU General Public License for more details.
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta You should have received a copy of the GNU General Public License
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta along with this program. If not, see <http://www.gnu.org/licenses/>.
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholastastatic void ssh_dp_reconnect_init(struct sbus_connection *conn,
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta struct be_conn *be_conn = talloc_get_type(pvt, struct be_conn);
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta /* Did we reconnect successfully? */
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_TRACE_FUNC, "Reconnected to the Data Provider.\n");
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta /* Identify ourselves to the data provider */
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta /* all fine */
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta /* Failed to reconnect */
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_FATAL_FAILURE, "Could not reconnect to %s provider.\n",
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_FATAL_FAILURE, "sss_process_init() failed\n");
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_FATAL_FAILURE, "fatal error initializing ssh_ctx\n");
728b10c81204929be5669c1e67bd086e09c47c00Jan Cholasta "(?P<name>[^@]+)@?(?P<domain>[^@]*$)",
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_FATAL_FAILURE, "fatal error initializing regex data\n");
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta /* Enable automatic reconnection to the Data Provider */
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "Failed to set up automatic reconnection\n");
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta for (iter = ssh_ctx->rctx->be_conns; iter; iter = iter->next) {
4fa3ef8d8a8a3cddf8025d306c3b90b37dd431bcJan Cholasta /* Get responder options */
4fa3ef8d8a8a3cddf8025d306c3b90b37dd431bcJan Cholasta /* Get ssh_hash_known_hosts option */
4fa3ef8d8a8a3cddf8025d306c3b90b37dd431bcJan Cholasta CONFDB_SSH_CONF_ENTRY, CONFDB_SSH_HASH_KNOWN_HOSTS,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_FATAL_FAILURE, "Error reading from confdb (%d) [%s]\n",
3882325ff60f89d0c312e9519bdfd1351978fd73Jan Cholasta /* Get ssh_known_hosts_timeout option */
3882325ff60f89d0c312e9519bdfd1351978fd73Jan Cholasta CONFDB_SSH_CONF_ENTRY, CONFDB_SSH_KNOWN_HOSTS_TIMEOUT,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_FATAL_FAILURE, "Error reading from confdb (%d) [%s]\n",
4de84af23db74e13e867985c9093f394c9fa8d51Sumit Bose ret = confdb_get_string(ssh_ctx->rctx->cdb, ssh_ctx,
4de84af23db74e13e867985c9093f394c9fa8d51Sumit Bose DEBUG(SSSDBG_FATAL_FAILURE, "Error reading CA DB from confdb (%d) [%s]\n",
0528fdec17d0031996e919fcd852459e86592c35Jakub Hrozek ret = schedule_get_domains_task(rctx, rctx->ev, rctx, NULL);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_FATAL_FAILURE, "schedule_get_domains_tasks failed.\n");
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_TRACE_FUNC, "SSH Initialization complete\n");
677a31351c80453d9ce006481364399a96312052René Genz /* Set debug level to invalid value so we can decide if -d 0 was used. */
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta pc = poptGetContext(argv[0], argc, argv, long_options, 0);
677a31351c80453d9ce006481364399a96312052René Genz /* set up things like debug, signals, daemonization, etc. */
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta /* This is not fatal, don't return */
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_OP_FAILURE, "Could not set up to exit "
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "when parent process does\n");
e7311aec8d691e5427317442387af1bc8fff3742Jan Cholasta /* loop on main */