ipa_id.c revision df0596ec12bc5091608371e2977f3111241e8caf
/*
SSSD
IPA Identity Backend Module
Authors:
Jan Zeleny <jzeleny@redhat.com>
Copyright (C) 2011 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 "providers/ldap/ldap_common.h"
#include "providers/ldap/sdap_async.h"
const char *default_text)
{
switch (*dp_error) {
case DP_ERR_OK:
return NULL;
}
("Bug: dp_error is OK on failed request\n"));
*dp_error = DP_ERR_FATAL;
break;
case DP_ERR_OFFLINE:
return "Offline";
case DP_ERR_FATAL:
return "Out of memory";
}
break;
default:
break;
}
return default_text;
}
struct tevent_context *ev,
struct ipa_id_ctx *ipa_ctx,
const char *name);
{
struct ipa_id_ctx *ipa_ctx;
struct sdap_id_ctx *ctx;
struct be_acct_req *ar;
}
/* if domain names do not match, this is a subdomain case */
/* netgroups are handled by a separate request function */
EINVAL, "Invalid filter type");
}
} else {
/* any account request is handled by sdap,
* any invalid request is caught there. */
}
if (!req) {
ENOMEM, "Out of memory");
}
}
{
struct be_acct_req);
const char *error_text;
} else {
}
"Account info lookup failed");
}
/* Request for netgroups
* - first start here and then go to ipa_netgroups.c
*/
struct ipa_id_get_netgroup_state {
struct tevent_context *ev;
struct ipa_id_ctx *ctx;
struct sdap_id_op *op;
struct sss_domain_info *domain;
const char *name;
int timeout;
char *filter;
const char **attrs;
struct sysdb_attrs **netgroups;
int dp_error;
};
struct tevent_context *ev,
struct ipa_id_ctx *ipa_ctx,
const char *name)
{
struct tevent_req *req;
struct ipa_id_get_netgroup_state *state;
struct tevent_req *subreq;
struct sdap_id_ctx *ctx;
char *clean_name;
int ret;
goto fail;
}
goto fail;
}
goto fail;
}
if (!subreq) {
goto fail;
}
return req;
fail:
return req;
}
{
struct tevent_req *req =
struct ipa_id_get_netgroup_state *state =
int dp_error = DP_ERR_FATAL;
int ret;
return;
}
if (!subreq) {
return;
}
return;
}
{
struct tevent_req *req =
struct ipa_id_get_netgroup_state *state =
int dp_error = DP_ERR_FATAL;
int ret;
/* retry */
if (!subreq) {
return;
}
return;
}
return;
}
return;
}
return;
}
}
return;
}
{
struct ipa_id_get_netgroup_state *state =
if (dp_error) {
}
return EOK;
}
{
struct ipa_id_ctx *ipa_ctx;
struct ipa_id_ctx);
}