/*
SSSD
KCM Server - the mainloop and server setup
Copyright (C) Red Hat, 2016
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <popt.h>
#include "responder/kcm/kcmsrv_ccache.h"
#include "responder/kcm/kcmsrv_pvt.h"
#include "responder/common/responder.h"
#include "util/sss_krb5.h"
#ifndef SSS_KCM_SOCKET_NAME
#endif
{
/* mark that we are shutting down the responder, so it is propagated
* into underlying contexts that are freed right before rctx */
rctx->shutting_down = true;
return 0;
}
{
char *str_db;
"secrets",
&str_db);
"Cannot get the KCM database type [%d]: %s\n",
return ret;
}
return EOK;
return EOK;
}
return EOK;
}
{
int ret;
char *sock_name;
"Failed to get file descriptors limit\n");
goto done;
}
"Cannot get the client idle timeout [%d]: %s\n",
goto done;
}
/* Ensure that the client timeout is at least ten seconds */
}
&sock_name);
"Cannot get KCM socket path [%d]: %s\n",
goto done;
}
"Cannot get KCM ccache DB [%d]: %s\n",
goto done;
}
"Cannot set up idle responder timeout\n");
/* Not fatal */
}
}
"Cannot create KCM request queue [%d]: %s\n",
goto done;
}
done:
return ret;
}
{
}
return 0;
}
struct tevent_context *ev,
enum kcm_ccdb_be cc_be)
{
return NULL;
}
return NULL;
}
return NULL;
}
return kcm_data;
}
struct tevent_context *ev,
struct confdb_ctx *cdb)
{
int ret;
return ENOMEM;
}
rctx->shutting_down = false;
goto fail;
}
goto fail;
}
"fatal error initializing responder data\n");
goto fail;
}
/* Set up file descriptor limits */
return EOK;
fail:
return ret;
}
{
int opt;
int ret;
};
/* Set debug level to invalid value so we can decide if -d 0 was used. */
switch(opt) {
default:
return 1;
}
}
/* set up things like debug, signals, daemonization, etc. */
debug_log_file = "sssd_kcm";
&main_ctx);
ret = die_if_parent_died();
/* This is not fatal, don't return */
"Could not set up to exit when parent process does\n");
}
/* loop on main */
return 0;
}