summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2010-09-01 16:30:32 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-09-08 09:36:22 -0400
commit87f2bb60510f31fec012d126411f09a99c72140e (patch)
tree48cce3b9f98265a2297c3a6f8be6cd55ed1a3855 /src/providers/ldap
parent88aeed9a31b734a92630d5e881c960c5f77ba0ce (diff)
downloadsssd-87f2bb60510f31fec012d126411f09a99c72140e.tar.gz
sssd-87f2bb60510f31fec012d126411f09a99c72140e.tar.xz
sssd-87f2bb60510f31fec012d126411f09a99c72140e.zip
Dead assignments cleanup in providers code
Dead assignments were deleted. Also prototype of function sdap_access_decide_offline() has been changed, since its return code was never used. Ticket: #586
Diffstat (limited to 'src/providers/ldap')
-rw-r--r--src/providers/ldap/ldap_id_enum.c3
-rw-r--r--src/providers/ldap/sdap_access.c18
2 files changed, 7 insertions, 14 deletions
diff --git a/src/providers/ldap/ldap_id_enum.c b/src/providers/ldap/ldap_id_enum.c
index 87b956331..d60519213 100644
--- a/src/providers/ldap/ldap_id_enum.c
+++ b/src/providers/ldap/ldap_id_enum.c
@@ -521,7 +521,6 @@ static struct tevent_req *enum_groups_send(TALLOC_CTX *memctx,
{
struct tevent_req *req, *subreq;
struct enum_groups_state *state;
- const char *attr_name;
int ret;
req = tevent_req_create(memctx, &state, struct enum_groups_state);
@@ -531,8 +530,6 @@ static struct tevent_req *enum_groups_send(TALLOC_CTX *memctx,
state->ctx = ctx;
state->op = op;
- attr_name = ctx->opts->group_map[SDAP_AT_GROUP_NAME].name;
-
if (ctx->max_group_timestamp && !purge) {
state->filter = talloc_asprintf(state,
diff --git a/src/providers/ldap/sdap_access.c b/src/providers/ldap/sdap_access.c
index 7d7832ad4..90b537119 100644
--- a/src/providers/ldap/sdap_access.c
+++ b/src/providers/ldap/sdap_access.c
@@ -99,7 +99,7 @@ struct sdap_access_req_ctx {
char *basedn;
};
-static int sdap_access_decide_offline(struct tevent_req *req);
+static void sdap_access_decide_offline(struct tevent_req *req);
static int sdap_access_retry(struct tevent_req *req);
static void sdap_access_connect_done(struct tevent_req *subreq);
static void sdap_access_get_access_done(struct tevent_req *req);
@@ -182,7 +182,7 @@ static struct tevent_req *sdap_access_send(TALLOC_CTX *mem_ctx,
/* Ok, we have one result, check if we are online or offline */
if (be_is_offline(state->be_ctx)) {
/* Ok, we're offline. Return from the cache */
- ret = sdap_access_decide_offline(req);
+ sdap_access_decide_offline(req);
goto finished;
}
@@ -241,7 +241,7 @@ finished:
return req;
}
-static int sdap_access_decide_offline(struct tevent_req *req)
+static void sdap_access_decide_offline(struct tevent_req *req)
{
struct sdap_access_req_ctx *state =
tevent_req_data(req, struct sdap_access_req_ctx);
@@ -253,8 +253,6 @@ static int sdap_access_decide_offline(struct tevent_req *req)
DEBUG(6, ("Access denied by cached credentials\n"));
state->pam_status = PAM_PERM_DENIED;
}
-
- return EOK;
}
static int sdap_access_retry(struct tevent_req *req)
@@ -287,11 +285,9 @@ static void sdap_access_connect_done(struct tevent_req *subreq)
if (ret != EOK) {
if (dp_error == DP_ERR_OFFLINE) {
- ret = sdap_access_decide_offline(req);
- if (ret == EOK) {
- tevent_req_done(req);
- return;
- }
+ sdap_access_decide_offline(req);
+ tevent_req_done(req);
+ return;
}
tevent_req_error(req, ret);
@@ -344,7 +340,7 @@ static void sdap_access_get_access_done(struct tevent_req *subreq)
}
state->pam_status = PAM_SYSTEM_ERR;
} else if (dp_error == DP_ERR_OFFLINE) {
- ret = sdap_access_decide_offline(req);
+ sdap_access_decide_offline(req);
} else {
DEBUG(1, ("sdap_get_generic_send() returned error [%d][%s]\n",
ret, strerror(ret)));