ad_id.c revision 3d28e0e560b787b5c57ed7327d184310342a7e38
/*
SSSD
Authors:
Stephen Gallagher <sgallagh@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 "providers/ad/ad_common.h"
struct ad_handle_acct_info_state {
struct be_acct_req *ar;
struct sdap_id_ctx *ctx;
struct sdap_id_conn_ctx **conn;
struct sdap_domain *sdom;
int dp_error;
const char *err;
};
struct tevent_req *
struct be_acct_req *ar,
struct sdap_id_ctx *ctx,
struct sdap_domain *sdom,
struct sdap_id_conn_ctx **conn)
{
struct tevent_req *req;
struct ad_handle_acct_info_state *state;
return NULL;
}
}
/* Lookup in progress */
return req;
}
static errno_t
{
struct tevent_req *subreq;
struct ad_handle_acct_info_state);
bool noexist_delete = false;
return EOK;
}
noexist_delete = true;
}
return ENOMEM;
}
return EAGAIN;
}
static void
{
int dp_error;
int sdap_err;
const char *err;
struct tevent_req);
struct ad_handle_acct_info_state);
return;
}
return;
return;
}
/* Ret is only ENOENT now. Try the next connection */
/* No additional search in progress. Save the last
* error status, we'll be returning it.
*/
/* No more connections */
} else {
}
return;
}
/* Another lookup in progress */
}
{
struct ad_handle_acct_info_state);
if (_dp_error) {
}
if (_err) {
}
return EOK;
}
struct sdap_id_conn_ctx **
{
struct sdap_id_conn_ctx **clist;
int i=0;
/* LDAP, GC, sentinel */
case BE_REQ_USER: /* user */
case BE_REQ_BY_SECID: /* by SID */
case BE_REQ_USER_AND_GROUP: /* get SID */
case BE_REQ_GROUP: /* group */
case BE_REQ_INITGROUPS: /* init groups for user */
i++;
} else {
}
break;
default:
break;
}
return clist;
}
void
{
struct be_acct_req *ar;
struct sdap_id_ctx *sdap_id_ctx;
struct tevent_req *req;
struct sss_domain_info *dom;
struct sdap_domain *sdom;
struct sdap_id_conn_ctx **clist;
struct ad_id_ctx);
if (be_is_offline(be_ctx)) {
}
/* Subdomain request, verify subdomain */
}
goto fail;
}
/* Determine whether to connect to GC, LDAP or try both */
goto fail;
}
goto fail;
}
goto fail;
}
return;
fail:
}
static void
{
int dp_error;
const char *error_text = "Internal error";
const char *req_error_text;
error_text = NULL;
} else {
("Bug: dp_error is OK on failed request"));
}
} else if (dp_error == DP_ERR_OFFLINE) {
error_text = "Offline";
error_text = "Out of memory";
} else {
}
}
void
{
struct ad_id_ctx);
}