ipa_subdomains_id.c revision 881c4ba834b23ae651ac01db667801f314eb0a5d
/*
SSSD
IPA Identity Backend Module for sub-domains
Authors:
Sumit Bose <sbose@redhat.com>
Copyright (C) 2012 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 <errno.h>
#include "util/strtonum.h"
#include "providers/ldap/ldap_common.h"
#include "providers/ldap/sdap_async.h"
struct ipa_user_get_state {
struct tevent_context *ev;
struct sdap_id_ctx *ctx;
struct sdap_id_op *op;
struct sss_domain_info *domain;
int entry_type;
const char *filter;
int filter_type;
const char **attrs;
int dp_error;
};
struct tevent_context *ev,
struct sdap_id_ctx *ctx,
struct be_acct_req *ar)
{
struct tevent_req *req;
struct ipa_user_get_state *state;
int ret;
goto fail;
}
goto fail;
}
switch (state->entry_type) {
case BE_REQ_USER:
break;
case BE_REQ_GROUP:
break;
default:
}
goto fail;
}
return req;
fail:
return req;
}
{
struct ipa_user_get_state);
struct tevent_req *subreq;
if (!subreq) {
return ret;
}
req);
return EOK;
}
{
struct tevent_req);
struct ipa_user_get_state);
int dp_error = DP_ERR_FATAL;
int ret;
const char *name;
char *endptr;
return;
}
switch (state->filter_type) {
case BE_FILTER_NAME:
id = 0;
break;
case BE_FILTER_IDNUM:
return;
}
break;
default:
return;
}
if (!subreq) {
return;
}
return;
}
{
struct tevent_req);
struct ipa_user_get_state);
int dp_error = DP_ERR_FATAL;
int ret;
/* retry */
return;
}
return;
}
return;
}
/* FIXME: do we need some special handling of ENOENT */
}
{
struct ipa_user_get_state);
if (dp_error_out) {
}
return EOK;
}