krb5_child_handler.c revision 369983d509540d8289e62675c6cf7009f964abd7
/*
SSSD
Kerberos 5 Backend Module - Manage krb5_child
Authors:
Sumit Bose <sbose@redhat.com>
Copyright (C) 2010 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 "providers/child_common.h"
#include "providers/krb5/krb5_common.h"
#include "providers/krb5/krb5_auth.h"
#include "src/providers/krb5/krb5_utils.h"
#ifndef SSSD_LIBEXEC_PATH
#error "SSSD_LIBEXEC_PATH not defined"
#else
#endif
struct io {
int read_from_child_fd;
int write_to_child_fd;
};
struct handle_child_state {
struct tevent_context *ev;
struct krb5child_req *kr;
struct tevent_timer *timeout_handler;
};
static int child_io_destructor(void *ptr)
{
int ret;
}
}
}
}
return EOK;
}
{
const char *keytab;
return EINVAL;
}
return ENOMEM;
}
}
}
}
return ENOMEM;
}
rp = 0;
}
}
}
return EOK;
}
struct tevent_timer *te,
{
struct handle_child_state);
int ret;
return;
}
if (ret == -1) {
}
}
struct tevent_context *ev,
const uint32_t timeout_seconds)
{
struct handle_child_state);
tv = tevent_timeval_current();
return ENOMEM;
}
return EOK;
}
{
int pipefd_to_child[2];
int pipefd_from_child[2];
int ret;
struct handle_child_state);
if (ret == -1) {
return err;
}
if (ret == -1) {
return err;
}
if (pid == 0) { /* child */
return ret;
}
}
return err;
}
} else if (pid > 0) { /* parent */
close(pipefd_to_child[0]);
return ret;
}
}
} else { /* error */
return err;
}
return EOK;
}
struct tevent_context *ev,
struct krb5child_req *kr)
{
struct handle_child_state *state;
int ret;
return NULL;
}
goto fail;
}
goto fail;
}
goto fail;
}
if (!subreq) {
goto fail;
}
return req;
fail:
return req;
}
{
struct tevent_req);
struct handle_child_state);
int ret;
return;
}
if (!subreq) {
return;
}
}
{
struct tevent_req);
struct handle_child_state);
int ret;
return;
}
return;
}
{
struct handle_child_state);
return EOK;
}