/*
SSSD
Helper routines for file descriptor events
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/ldap/sdap_async_private.h"
struct sdap_fd_events {
#ifdef HAVE_LDAP_CONNCB
#else
#endif
};
{
int ret;
*fd = -1;
return EIO;
}
return EOK;
}
{
/* sdap_fd_events might be NULL here if the back end was marked offline
* before a connection was established.
*/
if (sh->sdap_fd_events) {
#ifdef HAVE_LDAP_CONNCB
#else
#endif
}
return EOK;
}
#ifdef HAVE_LDAP_CONNCB
{
int lret;
struct ldap_cb_data);
if (lret != LDAP_OPT_SUCCESS) {
} else {
}
return EOK;
}
struct ldap_conncb *ctx)
{
int ret;
struct ldap_cb_data);
"sdap_ldap_connect_callback_add called without "
"callback data.\n");
return EINVAL;
}
if (ret == -1) {
return EINVAL;
}
if (DEBUG_IS_SET(SSSDBG_TRACE_LIBS)) {
}
if (fd_event_item == NULL) {
return ENOMEM;
}
return ENOMEM;
}
return LDAP_SUCCESS;
}
struct ldap_conncb *ctx)
{
int ret;
struct ldap_cb_data);
return;
}
if (ret == -1) {
return;
}
break;
}
}
if (fd_event_item == NULL) {
return;
}
return;
}
#else
struct tevent_context *ev)
{
int fd;
int ret;
if (sh->sdap_fd_events) {
"sdap_install_ldap_callbacks is called with already "
"initialized sdap_fd_events.\n");
return EINVAL;
}
if (!sh->sdap_fd_events) {
return ENOMEM;
}
sh);
return ENOMEM;
}
"Trace: sh[%p], connected[%d], ops[%p], fde[%p], ldap[%p]\n",
return EOK;
}
#endif
struct tevent_context *ev)
{
#ifdef HAVE_LDAP_CONNCB
int ret;
goto fail;
}
struct ldap_conncb);
goto fail;
}
goto fail;
}
if (ret != LDAP_OPT_SUCCESS) {
goto fail;
}
return EOK;
fail:
return ret;
#else
return EOK;
#endif
}
{
#ifndef HAVE_LDAP_CONNCB
#endif
return ret;
}
{
#ifdef HAVE_LDAP_CONNCB
int ret;
sb = ber_sockbuf_alloc();
return ENOMEM;
}
if (ret != 1) {
return EFAULT;
}
if (ret != 0) {
"ldap_url_parse failed to validate [%s] on fd [%d].\n",
return EFAULT;
}
return ret;
#else
return EOK;
#endif
}