/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2015 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 <talloc.h>
#include <tevent.h>
#include "providers/ldap/sdap_async.h"
#include "providers/ldap/ldap_common.h"
struct sdap_search_bases_ex_state {
const char *filter;
const char **attrs;
int map_num_attrs;
int timeout;
bool allow_paging;
bool return_first_reply;
};
static struct tevent_req *
struct tevent_context *ev,
struct sdap_options *opts,
struct sdap_handle *sh,
struct sdap_search_base **bases,
struct sdap_attr_map *map,
bool allow_paging,
bool return_first_reply,
int timeout,
const char *filter,
const char **attrs)
{
return NULL;
}
ret = ERR_INTERNAL;
goto immediately;
}
: timeout;
for (state->map_num_attrs = 0;
state->map_num_attrs++) {
/* no op */;
}
} else {
state->map_num_attrs = 0;
}
goto immediately;
}
}
/* asynchronous processing */
return req;
}
} else {
}
return req;
}
{
char *filter;
return EOK;
}
/* Combine lookup and search base filters. */
return ENOMEM;
}
return ENOMEM;
}
return EAGAIN;
}
{
size_t i;
int ret;
return;
}
/* Add rules to result. */
if (count > 0) {
if (state->return_first_reply == false) {
/* Merge with previous reply. */
struct sysdb_attrs *,
return;
}
for (i = 0; i < count; i++) {
attrs[i]);
}
} else {
/* Return the first successful search result. */
return;
}
}
/* Try next search base. */
}
return;
}
struct sysdb_attrs ***reply)
{
return EOK;
}
struct tevent_req *
struct tevent_context *ev,
struct sdap_options *opts,
struct sdap_handle *sh,
struct sdap_search_base **bases,
struct sdap_attr_map *map,
bool allow_paging,
int timeout,
const char *filter,
const char **attrs)
{
allow_paging, false, timeout,
}
struct sysdb_attrs ***_reply)
{
}
struct tevent_req *
struct tevent_context *ev,
struct sdap_options *opts,
struct sdap_handle *sh,
struct sdap_search_base **bases,
struct sdap_attr_map *map,
bool allow_paging,
int timeout,
const char *filter,
const char **attrs)
{
allow_paging, true, timeout,
}
struct sysdb_attrs ***_reply)
{
}
struct sdap_deref_bases_ex_state {
const char *filter;
const char **attrs;
const char *deref_attr;
unsigned int flags;
bool return_first_reply;
int timeout;
};
static struct tevent_req *
struct tevent_context *ev,
struct sdap_options *opts,
struct sdap_handle *sh,
struct sdap_search_base **bases,
struct sdap_attr_map_info *maps,
const char *filter,
const char **attrs,
const char *deref_attr,
unsigned int flags,
bool return_first_reply,
int timeout)
{
return NULL;
}
ret = ERR_INTERNAL;
goto immediately;
}
ret = ERR_INTERNAL;
goto immediately;
}
: timeout;
/* no op */;
}
/* asynchronous processing */
return req;
}
} else {
}
return req;
}
{
return EOK;
}
return ENOMEM;
}
return EAGAIN;
}
{
size_t i;
int ret;
return;
}
/* Add rules to result. */
if (count > 0) {
if (state->return_first_reply == false) {
/* Merge with previous reply. */
struct sdap_deref_attrs *,
return;
}
for (i = 0; i < count; i++) {
attrs[i]);
}
} else {
/* Return the first successful search result. */
return;
}
}
/* Try next search base. */
}
return;
}
struct sdap_deref_attrs ***reply)
{
return EOK;
}
struct tevent_req *
struct tevent_context *ev,
struct sdap_options *opts,
struct sdap_handle *sh,
struct sdap_search_base **bases,
struct sdap_attr_map_info *maps,
const char *filter,
const char **attrs,
const char *deref_attr,
unsigned int flags,
int timeout)
{
false, timeout);
}
struct sdap_deref_attrs ***_reply)
{
}
struct tevent_req *
struct tevent_context *ev,
struct sdap_options *opts,
struct sdap_handle *sh,
struct sdap_search_base **bases,
struct sdap_attr_map_info *maps,
const char *filter,
const char **attrs,
const char *deref_attr,
unsigned int flags,
int timeout)
{
true, timeout);
}
struct sdap_deref_attrs ***_reply)
{
}