/*
SSSD
LDAP Backend Module -- child helpers
Authors:
Jakub Hrozek <jhrozek@redhat.com>
Copyright (C) 2009 Red Hat
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 <pwd.h>
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
#include "util/sss_krb5.h"
#include "providers/ldap/ldap_common.h"
#include "providers/ldap/sdap_async_private.h"
#include "util/child_common.h"
#ifndef SSSD_LIBEXEC_PATH
#error "SSSD_LIBEXEC_PATH not defined"
#else
#endif
#ifndef LDAP_CHILD_USER
#endif
struct sdap_child {
/* child info */
};
{
int ret;
if (*fd == -1) {
return;
}
if (ret) {
}
*fd = -1;
}
struct tevent_signal *sige,
void *pvt)
{
"LDAP child was terminated due to timeout\n");
}
}
{
if (ret == -1) {
goto fail;
}
if (ret == -1) {
goto fail;
}
if (pid == 0) { /* child */
/* We should never get here */
} else if (pid > 0) { /* parent */
goto fail;
}
} else { /* error */
goto fail;
}
return EOK;
fail:
return ret;
}
const char *realm_str,
const char *princ_str,
const char *keytab_name,
{
return ENOMEM;
}
if (realm_str) {
}
if (princ_str) {
}
if (keytab_name) {
}
return ENOMEM;
}
rp = 0;
/* realm */
if (realm_str) {
} else {
}
/* principal */
if (princ_str) {
} else {
}
/* keytab */
if (keytab_name) {
} else {
}
/* lifetime */
/* UID and GID to drop privileges to, if needed. The ldap_child process runs as
* setuid if the back end runs unprivileged as it needs to access the keytab
*/
return EOK;
}
{
size_t p = 0;
char *ccn;
/* operation result code */
/* krb5 error code */
/* ccache name size */
return ENOMEM;
}
return EINVAL;
}
return EOK;
}
/* ==The-public-async-interface============================================*/
struct sdap_get_tgt_state {
};
struct tevent_context *ev,
int timeout);
struct tevent_context *ev,
const char *realm_str,
const char *princ_str,
const char *keytab_name,
int timeout)
{
int ret;
if (!req) {
return NULL;
}
goto fail;
}
goto fail;
}
/* prepare the data to pass to child */
&buf);
goto fail;
}
goto fail;
}
goto fail;
}
if (!subreq) {
goto fail;
}
return req;
fail:
return req;
}
{
struct tevent_req);
struct sdap_get_tgt_state);
int ret;
return;
}
if (!subreq) {
return;
}
}
{
struct tevent_req);
struct sdap_get_tgt_state);
int ret;
return;
}
return;
}
/* wait for child callback to terminate the request */
}
int *result,
char **ccname,
{
struct sdap_get_tgt_state);
char *ccn;
int res;
int ret;
return ret;
}
return EOK;
}
struct tevent_timer *te,
{
struct sdap_get_tgt_state);
int ret;
"timeout for sending SIGKILL to TGT child [%d] reached.\n",
if (ret == -1) {
}
}
struct tevent_timer *te,
{
struct sdap_get_tgt_state);
int ret;
"timeout for sending SIGTERM to TGT child [%d] reached.\n",
if (ret == -1) {
}
"Setting %d seconds timeout for sending SIGKILL to TGT child\n",
}
}
struct tevent_context *ev,
int timeout)
{
"Setting %d seconds timeout for TGT child\n", timeout);
return ENOMEM;
}
return EOK;
}
/* Setup child logging */
int sdap_setup_child(void)
{
}