summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-10-31 12:43:12 +0100
committerStephen Gallagher <sgallagh@redhat.com>2011-11-22 10:40:15 -0500
commitac3a1f3da772cf101101c31675c63dc3549b21b5 (patch)
tree83f68a5d28f276af3341f364afb0c7146bc1c8e6 /src
parent0e34a9148d90a6cc37369de15507b5967e30cecf (diff)
downloadsssd-ac3a1f3da772cf101101c31675c63dc3549b21b5.tar.gz
sssd-ac3a1f3da772cf101101c31675c63dc3549b21b5.tar.xz
sssd-ac3a1f3da772cf101101c31675c63dc3549b21b5.zip
Cleanup: Remove unused parameters
Diffstat (limited to 'src')
-rw-r--r--src/providers/data_provider_fo.c4
-rw-r--r--src/providers/ipa/ipa_access.c4
-rw-r--r--src/providers/ipa/ipa_dyndns.c3
-rw-r--r--src/providers/ipa/ipa_dyndns.h3
-rw-r--r--src/providers/ipa/ipa_hbac_common.c8
-rw-r--r--src/providers/ipa/ipa_hbac_hosts.c10
-rw-r--r--src/providers/ipa/ipa_hbac_private.h8
-rw-r--r--src/providers/ipa/ipa_hbac_rules.c2
-rw-r--r--src/providers/ipa/ipa_hbac_services.c4
-rw-r--r--src/providers/ipa/ipa_hbac_users.c2
-rw-r--r--src/providers/ipa/ipa_init.c2
-rw-r--r--src/providers/krb5/krb5_auth.c9
-rw-r--r--src/providers/ldap/ldap_auth.c3
-rw-r--r--src/providers/ldap/ldap_id_cleanup.c9
-rw-r--r--src/providers/ldap/sdap.c2
-rw-r--r--src/providers/ldap/sdap.h2
-rw-r--r--src/providers/ldap/sdap_access.c15
-rw-r--r--src/providers/ldap/sdap_async.c3
-rw-r--r--src/providers/ldap/sdap_async_connection.c14
-rw-r--r--src/providers/ldap/sdap_async_groups.c18
-rw-r--r--src/providers/ldap/sdap_async_initgroups.c23
-rw-r--r--src/providers/ldap/sdap_async_netgroups.c5
-rw-r--r--src/providers/proxy/proxy.h1
-rw-r--r--src/providers/proxy/proxy_id.c2
-rw-r--r--src/providers/proxy/proxy_netgroup.c1
-rw-r--r--src/python/pysss.c23
-rw-r--r--src/responder/nss/nsssrv.c3
-rw-r--r--src/sss_client/pam_sss.c10
-rw-r--r--src/tools/nscd.c4
-rw-r--r--src/tools/sss_groupadd.c2
-rw-r--r--src/tools/sss_sync_ops.c44
-rw-r--r--src/tools/sss_sync_ops.h5
-rw-r--r--src/tools/sss_useradd.c4
-rw-r--r--src/tools/tools_util.c4
-rw-r--r--src/tools/tools_util.h6
-rw-r--r--src/util/crypto/nss/nss_obfuscate.c7
36 files changed, 84 insertions, 185 deletions
diff --git a/src/providers/data_provider_fo.c b/src/providers/data_provider_fo.c
index fd23c0dbe..7a5c82c3e 100644
--- a/src/providers/data_provider_fo.c
+++ b/src/providers/data_provider_fo.c
@@ -62,7 +62,7 @@ int be_fo_is_srv_identifier(const char *server)
return server && strcasecmp(server, BE_SRV_IDENTIFIER) == 0;
}
-static int be_fo_get_options(TALLOC_CTX *mem_ctx, struct be_ctx *ctx,
+static int be_fo_get_options(struct be_ctx *ctx,
struct fo_options *opts)
{
errno_t ret;
@@ -108,7 +108,7 @@ int be_init_failover(struct be_ctx *ctx)
return ret;
}
- ret = be_fo_get_options(ctx->be_fo, ctx, &fopts);
+ ret = be_fo_get_options(ctx, &fopts);
if (ret != EOK) {
talloc_zfree(ctx->be_fo);
return ret;
diff --git a/src/providers/ipa/ipa_access.c b/src/providers/ipa/ipa_access.c
index 10f1cb7e6..f02f64ed8 100644
--- a/src/providers/ipa/ipa_access.c
+++ b/src/providers/ipa/ipa_access.c
@@ -296,7 +296,6 @@ static int hbac_get_host_info_step(struct hbac_ctx *hbac_ctx)
ipa_hbac_host_info_send(hbac_ctx,
hbac_ctx_ev(hbac_ctx),
hbac_ctx_sysdb(hbac_ctx),
- hbac_ctx_be(hbac_ctx)->domain,
sdap_id_op_handle(hbac_ctx->sdap_op),
hbac_ctx_sdap_id_ctx(hbac_ctx)->opts,
hbac_ctx->hbac_search_base);
@@ -329,7 +328,6 @@ static void hbac_get_service_info_step(struct tevent_req *req)
req = ipa_hbac_service_info_send(hbac_ctx,
hbac_ctx_ev(hbac_ctx),
hbac_ctx_sysdb(hbac_ctx),
- hbac_ctx_be(hbac_ctx)->domain,
sdap_id_op_handle(hbac_ctx->sdap_op),
hbac_ctx_sdap_id_ctx(hbac_ctx)->opts,
hbac_ctx->hbac_search_base);
@@ -395,8 +393,6 @@ static void hbac_get_rule_info_step(struct tevent_req *req)
req = ipa_hbac_rule_info_send(hbac_ctx,
hbac_ctx->get_deny_rules,
hbac_ctx_ev(hbac_ctx),
- hbac_ctx_sysdb(hbac_ctx),
- hbac_ctx_be(hbac_ctx)->domain,
sdap_id_op_handle(hbac_ctx->sdap_op),
hbac_ctx_sdap_id_ctx(hbac_ctx)->opts,
hbac_ctx->hbac_search_base,
diff --git a/src/providers/ipa/ipa_dyndns.c b/src/providers/ipa/ipa_dyndns.c
index c532c3d0b..946fa3900 100644
--- a/src/providers/ipa/ipa_dyndns.c
+++ b/src/providers/ipa/ipa_dyndns.c
@@ -138,8 +138,7 @@ fail:
}
-errno_t ipa_dyndns_init(TALLOC_CTX *mem_ctx,
- struct be_ctx *be_ctx,
+errno_t ipa_dyndns_init(struct be_ctx *be_ctx,
struct ipa_options *ctx)
{
errno_t ret;
diff --git a/src/providers/ipa/ipa_dyndns.h b/src/providers/ipa/ipa_dyndns.h
index 0d8ce7e7a..d86c6634b 100644
--- a/src/providers/ipa/ipa_dyndns.h
+++ b/src/providers/ipa/ipa_dyndns.h
@@ -25,8 +25,7 @@
#ifndef IPA_DYNDNS_H_
#define IPA_DYNDNS_H_
-errno_t ipa_dyndns_init(TALLOC_CTX *mem_ctx,
- struct be_ctx *be_ctx,
+errno_t ipa_dyndns_init(struct be_ctx *be_ctx,
struct ipa_options *ctx);
void ipa_dyndns_update(void *pvt);
diff --git a/src/providers/ipa/ipa_hbac_common.c b/src/providers/ipa/ipa_hbac_common.c
index 8815dae18..88532302d 100644
--- a/src/providers/ipa/ipa_hbac_common.c
+++ b/src/providers/ipa/ipa_hbac_common.c
@@ -299,7 +299,6 @@ hbac_attrs_to_rule(TALLOC_CTX *mem_ctx,
/* Get the users */
ret = hbac_user_attrs_to_rule(new_rule,
hbac_ctx_sysdb(hbac_ctx),
- hbac_ctx_be(hbac_ctx)->domain,
new_rule->name,
hbac_ctx->rules[idx],
&new_rule->users);
@@ -312,7 +311,6 @@ hbac_attrs_to_rule(TALLOC_CTX *mem_ctx,
/* Get the services */
ret = hbac_service_attrs_to_rule(new_rule,
hbac_ctx_sysdb(hbac_ctx),
- hbac_ctx_be(hbac_ctx)->domain,
new_rule->name,
hbac_ctx->rules[idx],
&new_rule->services);
@@ -325,7 +323,6 @@ hbac_attrs_to_rule(TALLOC_CTX *mem_ctx,
/* Get the target hosts */
ret = hbac_thost_attrs_to_rule(new_rule,
hbac_ctx_sysdb(hbac_ctx),
- hbac_ctx_be(hbac_ctx)->domain,
new_rule->name,
hbac_ctx->rules[idx],
&new_rule->targethosts);
@@ -338,7 +335,6 @@ hbac_attrs_to_rule(TALLOC_CTX *mem_ctx,
/* Get the source hosts */
ret = hbac_shost_attrs_to_rule(new_rule,
hbac_ctx_sysdb(hbac_ctx),
- hbac_ctx_be(hbac_ctx)->domain,
new_rule->name,
hbac_ctx->rules[idx],
&new_rule->srchosts);
@@ -396,7 +392,6 @@ done:
static errno_t
hbac_eval_user_element(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *domain,
const char *username,
struct hbac_request_element **user_element);
@@ -440,7 +435,7 @@ hbac_ctx_to_eval_request(TALLOC_CTX *mem_ctx,
eval_req->request_time = time(NULL);
/* Get user the user name and groups */
- ret = hbac_eval_user_element(eval_req, sysdb, domain,
+ ret = hbac_eval_user_element(eval_req, sysdb,
pd->user, &eval_req->user);
if (ret != EOK) goto done;
@@ -489,7 +484,6 @@ done:
static errno_t
hbac_eval_user_element(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *domain,
const char *username,
struct hbac_request_element **user_element)
{
diff --git a/src/providers/ipa/ipa_hbac_hosts.c b/src/providers/ipa/ipa_hbac_hosts.c
index 42a3f5c1b..75cbcd7fb 100644
--- a/src/providers/ipa/ipa_hbac_hosts.c
+++ b/src/providers/ipa/ipa_hbac_hosts.c
@@ -28,7 +28,6 @@
struct ipa_hbac_host_state {
struct tevent_context *ev;
struct sysdb_ctx *sysdb;
- struct sss_domain_info *dom;
struct sdap_handle *sh;
struct sdap_options *opts;
const char *search_base;
@@ -52,7 +51,6 @@ struct tevent_req *
ipa_hbac_host_info_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *dom,
struct sdap_handle *sh,
struct sdap_options *opts,
const char *search_base)
@@ -70,7 +68,6 @@ ipa_hbac_host_info_send(TALLOC_CTX *mem_ctx,
state->ev = ev;
state->sysdb = sysdb;
- state->dom = dom;
state->sh = sh;
state->opts = opts;
state->search_base = search_base;
@@ -246,7 +243,6 @@ ipa_hbac_host_info_recv(struct tevent_req *req,
*/
static errno_t hbac_host_attrs_to_rule(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *domain,
const char *rule_name,
struct sysdb_attrs *rule_attrs,
const char *category_attr,
@@ -441,14 +437,13 @@ done:
errno_t
hbac_thost_attrs_to_rule(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *domain,
const char *rule_name,
struct sysdb_attrs *rule_attrs,
struct hbac_rule_element **thosts)
{
DEBUG(7, ("Processing target hosts for rule [%s]\n", rule_name));
- return hbac_host_attrs_to_rule(mem_ctx, sysdb, domain,
+ return hbac_host_attrs_to_rule(mem_ctx, sysdb,
rule_name, rule_attrs,
IPA_HOST_CATEGORY, IPA_MEMBER_HOST,
NULL, thosts);
@@ -457,7 +452,6 @@ hbac_thost_attrs_to_rule(TALLOC_CTX *mem_ctx,
errno_t
hbac_shost_attrs_to_rule(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *domain,
const char *rule_name,
struct sysdb_attrs *rule_attrs,
struct hbac_rule_element **source_hosts)
@@ -471,7 +465,7 @@ hbac_shost_attrs_to_rule(TALLOC_CTX *mem_ctx,
DEBUG(7, ("Processing source hosts for rule [%s]\n", rule_name));
- ret = hbac_host_attrs_to_rule(tmp_ctx, sysdb, domain,
+ ret = hbac_host_attrs_to_rule(tmp_ctx, sysdb,
rule_name, rule_attrs,
IPA_SOURCE_HOST_CATEGORY, IPA_SOURCE_HOST,
&host_count, &shosts);
diff --git a/src/providers/ipa/ipa_hbac_private.h b/src/providers/ipa/ipa_hbac_private.h
index 32b5d70ce..6b5956df0 100644
--- a/src/providers/ipa/ipa_hbac_private.h
+++ b/src/providers/ipa/ipa_hbac_private.h
@@ -103,7 +103,6 @@ struct tevent_req *
ipa_hbac_host_info_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *dom,
struct sdap_handle *sh,
struct sdap_options *opts,
const char *search_base);
@@ -119,7 +118,6 @@ ipa_hbac_host_info_recv(struct tevent_req *req,
errno_t
hbac_thost_attrs_to_rule(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *domain,
const char *rule_name,
struct sysdb_attrs *rule_attrs,
struct hbac_rule_element **thosts);
@@ -127,7 +125,6 @@ hbac_thost_attrs_to_rule(TALLOC_CTX *mem_ctx,
errno_t
hbac_shost_attrs_to_rule(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *domain,
const char *rule_name,
struct sysdb_attrs *rule_attrs,
struct hbac_rule_element **source_hosts);
@@ -142,7 +139,6 @@ struct tevent_req *
ipa_hbac_service_info_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *dom,
struct sdap_handle *sh,
struct sdap_options *opts,
const char *search_base);
@@ -158,7 +154,6 @@ ipa_hbac_service_info_recv(struct tevent_req *req,
errno_t
hbac_service_attrs_to_rule(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *domain,
const char *rule_name,
struct sysdb_attrs *rule_attrs,
struct hbac_rule_element **services);
@@ -173,8 +168,6 @@ struct tevent_req *
ipa_hbac_rule_info_send(TALLOC_CTX *mem_ctx,
bool get_deny_rules,
struct tevent_context *ev,
- struct sysdb_ctx *sysdb,
- struct sss_domain_info *dom,
struct sdap_handle *sh,
struct sdap_options *opts,
const char *search_base,
@@ -190,7 +183,6 @@ ipa_hbac_rule_info_recv(struct tevent_req *req,
errno_t
hbac_user_attrs_to_rule(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *domain,
const char *rule_name,
struct sysdb_attrs *rule_attrs,
struct hbac_rule_element **users);
diff --git a/src/providers/ipa/ipa_hbac_rules.c b/src/providers/ipa/ipa_hbac_rules.c
index cc502a8fb..0b567dab8 100644
--- a/src/providers/ipa/ipa_hbac_rules.c
+++ b/src/providers/ipa/ipa_hbac_rules.c
@@ -38,8 +38,6 @@ struct tevent_req *
ipa_hbac_rule_info_send(TALLOC_CTX *mem_ctx,
bool get_deny_rules,
struct tevent_context *ev,
- struct sysdb_ctx *sysdb,
- struct sss_domain_info *dom,
struct sdap_handle *sh,
struct sdap_options *opts,
const char *search_base,
diff --git a/src/providers/ipa/ipa_hbac_services.c b/src/providers/ipa/ipa_hbac_services.c
index dace7b235..cc4e6dea5 100644
--- a/src/providers/ipa/ipa_hbac_services.c
+++ b/src/providers/ipa/ipa_hbac_services.c
@@ -27,7 +27,6 @@
struct ipa_hbac_service_state {
struct tevent_context *ev;
struct sysdb_ctx *sysdb;
- struct sss_domain_info *dom;
struct sdap_handle *sh;
struct sdap_options *opts;
const char *search_base;
@@ -50,7 +49,6 @@ struct tevent_req *
ipa_hbac_service_info_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *dom,
struct sdap_handle *sh,
struct sdap_options *opts,
const char *search_base)
@@ -69,7 +67,6 @@ ipa_hbac_service_info_send(TALLOC_CTX *mem_ctx,
state->ev = ev;
state->sysdb = sysdb;
- state->dom = dom;
state->sh = sh;
state->opts = opts;
state->search_base = search_base;
@@ -260,7 +257,6 @@ ipa_hbac_service_info_recv(struct tevent_req *req,
errno_t
hbac_service_attrs_to_rule(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *domain,
const char *rule_name,
struct sysdb_attrs *rule_attrs,
struct hbac_rule_element **services)
diff --git a/src/providers/ipa/ipa_hbac_users.c b/src/providers/ipa/ipa_hbac_users.c
index cf838e503..e25de6ad0 100644
--- a/src/providers/ipa/ipa_hbac_users.c
+++ b/src/providers/ipa/ipa_hbac_users.c
@@ -27,7 +27,6 @@
struct hbac_update_groups_state {
struct hbac_ctx *hbac_ctx;
struct sysdb_ctx *sysdb;
- struct sss_domain_info *domain;
};
@@ -150,7 +149,6 @@ done:
errno_t
hbac_user_attrs_to_rule(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *domain,
const char *rule_name,
struct sysdb_attrs *rule_attrs,
struct hbac_rule_element **users)
diff --git a/src/providers/ipa/ipa_init.c b/src/providers/ipa/ipa_init.c
index 5d08b8c18..df22535d0 100644
--- a/src/providers/ipa/ipa_init.c
+++ b/src/providers/ipa/ipa_init.c
@@ -149,7 +149,7 @@ int sssm_ipa_id_init(struct be_ctx *bectx,
/* nsupdate is available. Dynamic updates
* are supported
*/
- ret = ipa_dyndns_init(ctx, ctx->be, ipa_options);
+ ret = ipa_dyndns_init(ctx->be, ipa_options);
if (ret != EOK) {
DEBUG(1, ("Failure setting up automatic DNS update\n"));
/* We will continue without DNS updating */
diff --git a/src/providers/krb5/krb5_auth.c b/src/providers/krb5/krb5_auth.c
index d74068601..f177be513 100644
--- a/src/providers/krb5/krb5_auth.c
+++ b/src/providers/krb5/krb5_auth.c
@@ -148,7 +148,6 @@ static errno_t check_if_ccache_file_is_used(uid_t uid, const char *ccname,
static int krb5_mod_ccname(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *domain,
const char *name,
const char *ccname,
int mod_op)
@@ -212,21 +211,19 @@ done:
static int krb5_save_ccname(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *domain,
const char *name,
const char *ccname)
{
- return krb5_mod_ccname(mem_ctx, sysdb, domain, name, ccname,
+ return krb5_mod_ccname(mem_ctx, sysdb, name, ccname,
SYSDB_MOD_REP);
}
static int krb5_delete_ccname(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *domain,
const char *name,
const char *ccname)
{
- return krb5_mod_ccname(mem_ctx, sysdb, domain, name, ccname,
+ return krb5_mod_ccname(mem_ctx, sysdb, name, ccname,
SYSDB_MOD_DEL);
}
@@ -848,7 +845,6 @@ static void krb5_child_done(struct tevent_req *subreq)
}
ret = krb5_delete_ccname(state, state->be_ctx->sysdb,
- state->be_ctx->domain,
pd->user, kr->old_ccname);
if (ret != EOK) {
DEBUG(1, ("krb5_delete_ccname failed.\n"));
@@ -922,7 +918,6 @@ static void krb5_child_done(struct tevent_req *subreq)
}
ret = krb5_save_ccname(state, state->be_ctx->sysdb,
- state->be_ctx->domain,
pd->user, kr->ccname);
if (ret) {
DEBUG(1, ("krb5_save_ccname failed.\n"));
diff --git a/src/providers/ldap/ldap_auth.c b/src/providers/ldap/ldap_auth.c
index df4557938..f58d52fee 100644
--- a/src/providers/ldap/ldap_auth.c
+++ b/src/providers/ldap/ldap_auth.c
@@ -341,7 +341,6 @@ shadow_fail:
static int get_user_dn(TALLOC_CTX *memctx,
struct sysdb_ctx *sysdb,
struct sdap_options *opts,
- struct sss_domain_info *dom,
const char *username,
char **user_dn,
enum pwexpire *user_pw_expire_type,
@@ -604,7 +603,7 @@ static void auth_connect_done(struct tevent_req *subreq)
}
ret = get_user_dn(state, state->ctx->be->sysdb, state->ctx->opts,
- state->ctx->be->domain, state->username, &state->dn,
+ state->username, &state->dn,
&state->pw_expire_type, &state->pw_expire_data);
if (ret) {
tevent_req_error(req, ret);
diff --git a/src/providers/ldap/ldap_id_cleanup.c b/src/providers/ldap/ldap_id_cleanup.c
index 9c50ee485..27a86b9f6 100644
--- a/src/providers/ldap/ldap_id_cleanup.c
+++ b/src/providers/ldap/ldap_id_cleanup.c
@@ -171,8 +171,7 @@ struct global_cleanup_state {
static int cleanup_users(TALLOC_CTX *memctx, struct sdap_id_ctx *ctx);
static int cleanup_groups(TALLOC_CTX *memctx,
- struct sysdb_ctx *sysdb,
- struct sss_domain_info *domain);
+ struct sysdb_ctx *sysdb);
struct tevent_req *ldap_id_cleanup_send(TALLOC_CTX *memctx,
struct tevent_context *ev,
@@ -203,8 +202,7 @@ struct tevent_req *ldap_id_cleanup_send(TALLOC_CTX *memctx,
}
ret = cleanup_groups(state,
- state->ctx->be->sysdb,
- state->ctx->be->domain);
+ state->ctx->be->sysdb);
if (ret) {
goto fail;
}
@@ -379,8 +377,7 @@ static int cleanup_users_logged_in(hash_table_t *table,
/* ==Group-Cleanup-Process================================================ */
static int cleanup_groups(TALLOC_CTX *memctx,
- struct sysdb_ctx *sysdb,
- struct sss_domain_info *domain)
+ struct sysdb_ctx *sysdb)
{
TALLOC_CTX *tmpctx;
const char *attrs[] = { SYSDB_NAME, SYSDB_GIDNUM, NULL };
diff --git a/src/providers/ldap/sdap.c b/src/providers/ldap/sdap.c
index c3f507bb1..373bd4d22 100644
--- a/src/providers/ldap/sdap.c
+++ b/src/providers/ldap/sdap.c
@@ -281,7 +281,6 @@ int sdap_parse_group(TALLOC_CTX *memctx, struct sdap_options *opts,
errno_t sdap_parse_deref(TALLOC_CTX *mem_ctx,
struct sdap_attr_map_info *minfo,
size_t num_maps,
- struct sdap_handle *sh,
LDAPDerefRes *dref,
struct sdap_deref_attrs ***_res)
{
@@ -733,7 +732,6 @@ done:
}
errno_t sdap_set_config_options_with_rootdse(struct sysdb_attrs *rootdse,
- struct sdap_handle *sh,
struct sdap_options *opts)
{
int ret;
diff --git a/src/providers/ldap/sdap.h b/src/providers/ldap/sdap.h
index b32560a8f..c8eb92819 100644
--- a/src/providers/ldap/sdap.h
+++ b/src/providers/ldap/sdap.h
@@ -357,7 +357,6 @@ int sdap_parse_group(TALLOC_CTX *memctx, struct sdap_options *opts,
errno_t sdap_parse_deref(TALLOC_CTX *mem_ctx,
struct sdap_attr_map_info *minfo,
size_t num_maps,
- struct sdap_handle *sh,
LDAPDerefRes *dref,
struct sdap_deref_attrs ***_res);
@@ -387,7 +386,6 @@ int sdap_control_create(struct sdap_handle *sh, const char *oid, int iscritical,
struct berval *value, int dupval, LDAPControl **ctrlp);
errno_t sdap_set_config_options_with_rootdse(struct sysdb_attrs *rootdse,
- struct sdap_handle *sh,
struct sdap_options *opts);
int sdap_get_server_opts_from_rootdse(TALLOC_CTX *memctx,
const char *server,
diff --git a/src/providers/ldap/sdap_access.c b/src/providers/ldap/sdap_access.c
index 9f10a1464..287ba1254 100644
--- a/src/providers/ldap/sdap_access.c
+++ b/src/providers/ldap/sdap_access.c
@@ -71,7 +71,6 @@ static void sdap_access_filter_done(struct tevent_req *subreq);
static struct tevent_req *sdap_account_expired_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
- struct be_ctx *be_ctx,
struct sdap_access_ctx *access_ctx,
struct pam_data *pd,
struct ldb_message *user_entry);
@@ -82,7 +81,6 @@ static void sdap_access_service_done(struct tevent_req *subreq);
static struct tevent_req *sdap_access_service_send(
TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
- struct sdap_access_ctx *access_ctx,
struct pam_data *pd,
struct ldb_message *user_entry);
@@ -95,8 +93,6 @@ static void sdap_access_host_done(struct tevent_req *subreq);
static struct tevent_req *sdap_access_host_send(
TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
- struct sdap_access_ctx *access_ctx,
- struct pam_data *pd,
struct ldb_message *user_entry);
static void sdap_access_done(struct tevent_req *req);
@@ -247,7 +243,7 @@ static errno_t select_next_rule(struct tevent_req *req)
return EOK;
case LDAP_ACCESS_EXPIRE:
- subreq = sdap_account_expired_send(state, state->ev, state->be_ctx,
+ subreq = sdap_account_expired_send(state, state->ev,
state->access_ctx,
state->pd,
state->user_entry);
@@ -261,7 +257,6 @@ static errno_t select_next_rule(struct tevent_req *req)
case LDAP_ACCESS_SERVICE:
subreq = sdap_access_service_send(state, state->ev,
- state->access_ctx,
state->pd,
state->user_entry);
if (subreq == NULL) {
@@ -273,9 +268,7 @@ static errno_t select_next_rule(struct tevent_req *req)
case LDAP_ACCESS_HOST:
subreq = sdap_access_host_send(state, state->ev,
- state->access_ctx,
- state->pd,
- state->user_entry);
+ state->user_entry);
if (subreq == NULL) {
DEBUG(1, ("sdap_access_host_send failed.\n"));
return ENOMEM;
@@ -645,7 +638,6 @@ struct sdap_account_expired_req_ctx {
static struct tevent_req *sdap_account_expired_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
- struct be_ctx *be_ctx,
struct sdap_access_ctx *access_ctx,
struct pam_data *pd,
struct ldb_message *user_entry)
@@ -1126,7 +1118,6 @@ struct sdap_access_service_ctx {
static struct tevent_req *sdap_access_service_send(
TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
- struct sdap_access_ctx *access_ctx,
struct pam_data *pd,
struct ldb_message *user_entry)
{
@@ -1260,8 +1251,6 @@ struct sdap_access_host_ctx {
static struct tevent_req *sdap_access_host_send(
TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
- struct sdap_access_ctx *access_ctx,
- struct pam_data *pd,
struct ldb_message *user_entry)
{
errno_t ret;
diff --git a/src/providers/ldap/sdap_async.c b/src/providers/ldap/sdap_async.c
index a1355f93e..b1177e274 100644
--- a/src/providers/ldap/sdap_async.c
+++ b/src/providers/ldap/sdap_async.c
@@ -933,6 +933,7 @@ sdap_get_generic_ext_send(TALLOC_CTX *memctx,
state->attrs = attrs;
state->attrsonly = attrsonly;
state->op = NULL;
+ state->sizelimit = sizelimit;
state->timeout = timeout;
state->cookie.bv_len = 0;
state->cookie.bv_val = NULL;
@@ -1452,7 +1453,7 @@ static errno_t sdap_x_deref_parse_entry(struct sdap_handle *sh,
for (dref = deref_res; dref; dref=dref->next) {
ret = sdap_parse_deref(tmp_ctx, state->maps, state->num_maps,
- state->sh, dref, &res);
+ dref, &res);
if (ret) {
DEBUG(SSSDBG_OP_FAILURE, ("sdap_parse_deref failed [%d]: %s\n",
ret, strerror(ret)));
diff --git a/src/providers/ldap/sdap_async_connection.c b/src/providers/ldap/sdap_async_connection.c
index cb7325365..dfec3548a 100644
--- a/src/providers/ldap/sdap_async_connection.c
+++ b/src/providers/ldap/sdap_async_connection.c
@@ -982,8 +982,7 @@ struct sdap_auth_state {
};
static void sdap_auth_done(struct tevent_req *subreq);
-static int sdap_auth_get_authtok(TALLOC_CTX *memctx,
- const char *authtok_type,
+static int sdap_auth_get_authtok(const char *authtok_type,
struct dp_opt_blob authtok,
struct berval *pw);
@@ -1006,7 +1005,7 @@ struct tevent_req *sdap_auth_send(TALLOC_CTX *memctx,
state->user_dn = user_dn;
- ret = sdap_auth_get_authtok(state, authtok_type, authtok, &state->pw);
+ ret = sdap_auth_get_authtok(authtok_type, authtok, &state->pw);
if (ret != EOK) {
if (ret == ENOSYS) {
DEBUG(1, ("Getting authtok is not supported with the "
@@ -1039,8 +1038,7 @@ struct tevent_req *sdap_auth_send(TALLOC_CTX *memctx,
return req;
}
-static int sdap_auth_get_authtok(TALLOC_CTX *mem_ctx,
- const char *authtok_type,
+static int sdap_auth_get_authtok(const char *authtok_type,
struct dp_opt_blob authtok,
struct berval *pw)
{
@@ -1353,8 +1351,7 @@ static void sdap_cli_rootdse_done(struct tevent_req *subreq)
return;
}
- ret = sdap_set_config_options_with_rootdse(rootdse, state->sh,
- state->opts);
+ ret = sdap_set_config_options_with_rootdse(rootdse, state->opts);
if (ret) {
DEBUG(1, ("sdap_set_config_options_with_rootdse failed.\n"));
tevent_req_error(req, ret);
@@ -1680,8 +1677,7 @@ static int sdap_rebind_proc(LDAP *ldap, LDAP_CONST char *url, ber_tag_t request,
user_dn = dp_opt_get_string(p->opts->basic, SDAP_DEFAULT_BIND_DN);
if (user_dn != NULL) {
- ret = sdap_auth_get_authtok(tmp_ctx,
- dp_opt_get_string(p->opts->basic,
+ ret = sdap_auth_get_authtok(dp_opt_get_string(p->opts->basic,
SDAP_DEFAULT_AUTHTOK_TYPE),
dp_opt_get_blob(p->opts->basic,
SDAP_DEFAULT_AUTHTOK),
diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c
index 25a3e0a5b..11f6b5c7d 100644
--- a/src/providers/ldap/sdap_async_groups.c
+++ b/src/providers/ldap/sdap_async_groups.c
@@ -178,9 +178,7 @@ done:
/* FIXME: support storing additional attributes */
static errno_t
-sdap_store_group_with_gid(TALLOC_CTX *mem_ctx,
- struct sysdb_ctx *ctx,
- struct sss_domain_info *domain,
+sdap_store_group_with_gid(struct sysdb_ctx *ctx,
const char *name,
gid_t gid,
struct sysdb_attrs *group_attrs,
@@ -387,7 +385,7 @@ static int sdap_save_group(TALLOC_CTX *memctx,
DEBUG(6, ("Storing info for group %s\n", name));
- ret = sdap_store_group_with_gid(group_attrs, ctx, dom,
+ ret = sdap_store_group_with_gid(ctx,
name, gid, group_attrs,
dp_opt_get_int(opts->basic,
SDAP_ENTRY_CACHE_TIMEOUT),
@@ -1530,7 +1528,6 @@ int sdap_get_groups_recv(struct tevent_req *req,
}
static errno_t sdap_nested_group_populate_users(struct sysdb_ctx *sysdb,
- struct sss_domain_info *dom,
struct sdap_options *opts,
struct sysdb_attrs **users,
int num_users);
@@ -1608,8 +1605,8 @@ static void sdap_nested_done(struct tevent_req *subreq)
}
in_transaction = true;
- ret = sdap_nested_group_populate_users(state->sysdb, state->dom,
- state->opts, users, user_count);
+ ret = sdap_nested_group_populate_users(state->sysdb, state->opts,
+ users, user_count);
if (ret != EOK) {
goto fail;
}
@@ -1642,7 +1639,6 @@ fail:
}
static errno_t sdap_nested_group_populate_users(struct sysdb_ctx *sysdb,
- struct sss_domain_info *dom,
struct sdap_options *opts,
struct sysdb_attrs **users,
int num_users)
@@ -1970,7 +1966,6 @@ immediate:
static errno_t sdap_nested_group_check_hash(struct sdap_nested_group_ctx *);
static errno_t sdap_nested_group_check_cache(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *domain,
struct sdap_options *opts,
char *member_dn,
struct ldb_message ***_msgs,
@@ -2026,7 +2021,7 @@ static errno_t sdap_nested_group_process_deref_step(struct tevent_req *req)
}
ret = sdap_nested_group_check_cache(state, state->sysdb,
- state->domain, state->opts,
+ state->opts,
state->member_dn,
&msgs, &mtype);
if (ret == EOK) {
@@ -2132,7 +2127,7 @@ static errno_t sdap_nested_group_process_step(struct tevent_req *req)
}
ret = sdap_nested_group_check_cache(state, state->sysdb,
- state->domain, state->opts,
+ state->opts,
state->member_dn,
&msgs, &mtype);
if (ret == EOK) {
@@ -2225,7 +2220,6 @@ sdap_nested_group_check_hash(struct sdap_nested_group_ctx *state)
static errno_t
sdap_nested_group_check_cache(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *domain,
struct sdap_options *opts,
char *dn,
struct ldb_message ***_msgs,
diff --git a/src/providers/ldap/sdap_async_initgroups.c b/src/providers/ldap/sdap_async_initgroups.c
index 0ab30cfdb..08eff0f00 100644
--- a/src/providers/ldap/sdap_async_initgroups.c
+++ b/src/providers/ldap/sdap_async_initgroups.c
@@ -29,7 +29,6 @@
/* ==Save-fake-group-list=====================================*/
static errno_t sdap_add_incomplete_groups(struct sysdb_ctx *sysdb,
struct sdap_options *opts,
- struct sss_domain_info *dom,
char **groupnames,
struct sysdb_attrs **ldap_groups,
int ldap_groups_count)
@@ -162,7 +161,6 @@ fail:
static int sdap_initgr_common_store(struct sysdb_ctx *sysdb,
struct sdap_options *opts,
- struct sss_domain_info *dom,
const char *name,
enum sysdb_member_type type,
char **sysdb_grouplist,
@@ -216,7 +214,7 @@ static int sdap_initgr_common_store(struct sysdb_ctx *sysdb,
* member of but that are not cached in sysdb
*/
if (add_groups && add_groups[0]) {
- ret = sdap_add_incomplete_groups(sysdb, opts, dom,
+ ret = sdap_add_incomplete_groups(sysdb, opts,
add_groups, ldap_groups,
ldap_groups_count);
if (ret != EOK) {
@@ -260,7 +258,6 @@ struct sdap_initgr_rfc2307_state {
struct tevent_context *ev;
struct sysdb_ctx *sysdb;
struct sdap_options *opts;
- struct sss_domain_info *dom;
struct sdap_handle *sh;
const char **attrs;
const char *name;
@@ -284,9 +281,7 @@ struct tevent_req *sdap_initgr_rfc2307_send(TALLOC_CTX *memctx,
struct tevent_context *ev,
struct sdap_options *opts,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *dom,
struct sdap_handle *sh,
- const char *base_dn,
const char *name)
{
struct tevent_req *req;
@@ -300,7 +295,6 @@ struct tevent_req *sdap_initgr_rfc2307_send(TALLOC_CTX *memctx,
state->ev = ev;
state->opts = opts;
state->sysdb = sysdb;
- state->dom = dom;
state->sh = sh;
state->op = NULL;
state->timeout = dp_opt_get_int(state->opts->basic, SDAP_SEARCH_TIMEOUT);
@@ -485,7 +479,7 @@ static void sdap_initgr_rfc2307_process(struct tevent_req *subreq)
/* There are no nested groups here so we can just update the
* memberships */
ret = sdap_initgr_common_store(state->sysdb, state->opts,
- state->dom, state->name,
+ state->name,
SYSDB_MEMBER_USER,
sysdb_grouplist,
state->ldap_groups,
@@ -508,7 +502,6 @@ static int sdap_initgr_rfc2307_recv(struct tevent_req *req)
/* ==Common code for pure RFC2307bis and IPA/AD========================= */
static errno_t
sdap_nested_groups_store(struct sysdb_ctx *sysdb,
- struct sss_domain_info *dom,
struct sdap_options *opts,
struct sysdb_attrs **groups,
unsigned long count)
@@ -540,7 +533,7 @@ sdap_nested_groups_store(struct sysdb_ctx *sysdb,
}
in_transaction = true;
- ret = sdap_add_incomplete_groups(sysdb, opts, dom, groupnamelist,
+ ret = sdap_add_incomplete_groups(sysdb, opts, groupnamelist,
groups, count);
if (ret != EOK) {
DEBUG(6, ("Could not add incomplete groups [%d]: %s\n",
@@ -874,7 +867,7 @@ fail:
static errno_t
sdap_initgr_store_groups(struct sdap_initgr_nested_state *state)
{
- return sdap_nested_groups_store(state->sysdb, state->dom,
+ return sdap_nested_groups_store(state->sysdb,
state->opts, state->groups,
state->groups_cur);
}
@@ -1606,7 +1599,7 @@ save_rfc2307bis_groups(struct sdap_initgr_rfc2307bis_state *state)
}
talloc_zfree(values);
- ret = sdap_nested_groups_store(state->sysdb, state->dom, state->opts,
+ ret = sdap_nested_groups_store(state->sysdb, state->opts,
groups, count);
if (ret != EOK) {
DEBUG(3, ("Could not save groups [%d]: %s\n",
@@ -2430,10 +2423,8 @@ static void sdap_get_initgr_user(struct tevent_req *subreq)
}
subreq = sdap_initgr_rfc2307_send(state, state->ev, state->opts,
- state->sysdb, state->dom, state->sh,
- dp_opt_get_string(state->opts->basic,
- SDAP_GROUP_SEARCH_BASE),
- state->name);
+ state->sysdb, state->sh,
+ state->name);
if (!subreq) {
tevent_req_error(req, ENOMEM);
return;
diff --git a/src/providers/ldap/sdap_async_netgroups.c b/src/providers/ldap/sdap_async_netgroups.c
index 1f0d1dd27..e963159c4 100644
--- a/src/providers/ldap/sdap_async_netgroups.c
+++ b/src/providers/ldap/sdap_async_netgroups.c
@@ -39,7 +39,6 @@ static bool is_dn(const char *str)
static errno_t sdap_save_netgroup(TALLOC_CTX *memctx,
struct sysdb_ctx *ctx,
struct sdap_options *opts,
- struct sss_domain_info *dom,
struct sysdb_attrs *attrs,
char **_timestamp,
time_t now)
@@ -239,7 +238,6 @@ struct netgr_translate_members_state {
struct tevent_context *ev;
struct sdap_options *opts;
struct sdap_handle *sh;
- struct sss_domain_info *dom;
struct sysdb_ctx *sysdb;
struct sysdb_attrs **netgroups;
@@ -284,7 +282,6 @@ struct tevent_req *netgr_translate_members_send(TALLOC_CTX *memctx,
state->ev = ev;
state->opts = opts;
- state->dom = dom;
state->sh = sh;
state->sysdb = sysdb;
state->netgroups = netgroups;
@@ -729,7 +726,7 @@ static void netgr_translate_members_done(struct tevent_req *subreq)
now = time(NULL);
for (c = 0; c < state->count; c++) {
ret = sdap_save_netgroup(state, state->sysdb,
- state->opts, state->dom,
+ state->opts,
state->netgroups[c],
&state->higher_timestamp,
now);
diff --git a/src/providers/proxy/proxy.h b/src/providers/proxy/proxy.h
index fdf037c5d..c75242890 100644
--- a/src/providers/proxy/proxy.h
+++ b/src/providers/proxy/proxy.h
@@ -142,7 +142,6 @@ void proxy_pam_handler(struct be_req *req);
/* From proxy_netgroup.c */
errno_t get_netgroup(struct proxy_id_ctx *ctx,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *dom,
const char *name);
diff --git a/src/providers/proxy/proxy_id.c b/src/providers/proxy/proxy_id.c
index c7fdf356c..0a5f5427e 100644
--- a/src/providers/proxy/proxy_id.c
+++ b/src/providers/proxy/proxy_id.c
@@ -1176,7 +1176,7 @@ void proxy_get_account_info(struct be_req *breq)
ENODEV, "Netgroups are not supported");
}
- ret = get_netgroup(ctx, sysdb, domain, ar->filter_value);
+ ret = get_netgroup(ctx, sysdb, ar->filter_value);
break;
default: /*fail*/
diff --git a/src/providers/proxy/proxy_netgroup.c b/src/providers/proxy/proxy_netgroup.c
index bad0ee450..d0dd819e7 100644
--- a/src/providers/proxy/proxy_netgroup.c
+++ b/src/providers/proxy/proxy_netgroup.c
@@ -65,7 +65,6 @@ static errno_t make_netgroup_attr(struct __netgrent netgrent,
errno_t get_netgroup(struct proxy_id_ctx *ctx,
struct sysdb_ctx *sysdb,
- struct sss_domain_info *dom,
const char *name)
{
struct __netgrent result;
diff --git a/src/python/pysss.c b/src/python/pysss.c
index bd965fdf1..948fd160b 100644
--- a/src/python/pysss.c
+++ b/src/python/pysss.c
@@ -41,7 +41,7 @@ static char **PyList_AsStringList(TALLOC_CTX *mem_ctx, PyObject *list,
char **ret;
int i;
- ret = talloc_array(NULL, char *, PyList_Size(list)+1);
+ ret = talloc_array(mem_ctx, char *, PyList_Size(list)+1);
for (i = 0; i < PyList_Size(list); i++) {
PyObject *item = PyList_GetItem(list, i);
if (!PyString_Check(item)) {
@@ -106,8 +106,7 @@ static void PyErr_SetSssError(int ret)
/*
* Common init of all methods
*/
-struct tools_ctx *init_ctx(TALLOC_CTX *mem_ctx,
- PySssLocalObject *self)
+static struct tools_ctx *init_ctx(PySssLocalObject *self)
{
struct ops_ctx *octx = NULL;
struct tools_ctx *tctx = NULL;
@@ -190,7 +189,7 @@ static PyObject *py_sss_useradd(PySssLocalObject *self,
goto fail;
}
- tctx = init_ctx(self->mem_ctx, self);
+ tctx = init_ctx(self);
if (!tctx) {
PyErr_NoMemory();
return NULL;
@@ -264,10 +263,8 @@ static PyObject *py_sss_useradd(PySssLocalObject *self,
}
}
- ret = create_homedir(tctx,
- tctx->octx->skeldir,
+ ret = create_homedir(tctx->octx->skeldir,
tctx->octx->home,
- tctx->octx->name,
tctx->octx->uid,
tctx->octx->gid,
tctx->octx->umask);
@@ -326,7 +323,7 @@ static PyObject *py_sss_userdel(PySssLocalObject *self,
goto fail;
}
- tctx = init_ctx(self->mem_ctx, self);
+ tctx = init_ctx(self);
if (!tctx) {
PyErr_NoMemory();
return NULL;
@@ -450,7 +447,7 @@ static PyObject *py_sss_usermod(PySssLocalObject *self,
goto fail;
}
- tctx = init_ctx(self->mem_ctx, self);
+ tctx = init_ctx(self);
if (!tctx) {
PyErr_NoMemory();
return NULL;
@@ -546,7 +543,7 @@ static PyObject *py_sss_groupadd(PySssLocalObject *self,
goto fail;
}
- tctx = init_ctx(self->mem_ctx, self);
+ tctx = init_ctx(self);
if (!tctx) {
PyErr_NoMemory();
return NULL;
@@ -563,7 +560,7 @@ static PyObject *py_sss_groupadd(PySssLocalObject *self,
}
/* groupadd */
- tctx->error = groupadd(tctx, tctx->sysdb, tctx->octx);
+ tctx->error = groupadd(tctx->sysdb, tctx->octx);
if (tctx->error) {
/* cancel transaction */
sysdb_transaction_cancel(tctx->sysdb);
@@ -604,7 +601,7 @@ static PyObject *py_sss_groupdel(PySssLocalObject *self,
goto fail;
}
- tctx = init_ctx(self->mem_ctx, self);
+ tctx = init_ctx(self);
if (!tctx) {
PyErr_NoMemory();
return NULL;
@@ -664,7 +661,7 @@ static PyObject *py_sss_groupmod(PySssLocalObject *self,
goto fail;
}
- tctx = init_ctx(self->mem_ctx, self);
+ tctx = init_ctx(self);
if (!tctx) {
PyErr_NoMemory();
return NULL;
diff --git a/src/responder/nss/nsssrv.c b/src/responder/nss/nsssrv.c
index f33f8f4ca..b6dd8ae20 100644
--- a/src/responder/nss/nsssrv.c
+++ b/src/responder/nss/nsssrv.c
@@ -132,7 +132,6 @@ done:
}
static int nss_get_config(struct nss_ctx *nctx,
- struct resp_ctx *rctx,
struct confdb_ctx *cdb)
{
int ret;
@@ -294,7 +293,7 @@ int nss_process_init(TALLOC_CTX *mem_ctx,
}
nctx->rctx->pvt_ctx = nctx;
- ret = nss_get_config(nctx, nctx->rctx, cdb);
+ ret = nss_get_config(nctx, cdb);
if (ret != EOK) {
DEBUG(0, ("fatal error getting nss config\n"));
return ret;
diff --git a/src/sss_client/pam_sss.c b/src/sss_client/pam_sss.c
index e6417016f..0f30e1854 100644
--- a/src/sss_client/pam_sss.c
+++ b/src/sss_client/pam_sss.c
@@ -747,16 +747,10 @@ static int user_info_offline_auth_delayed(pam_handle_t *pamh, size_t buflen,
return PAM_SUCCESS;
}
-static int user_info_offline_chpass(pam_handle_t *pamh, size_t buflen,
- uint8_t *buf)
+static int user_info_offline_chpass(pam_handle_t *pamh)
{
int ret;
- if (buflen != sizeof(uint32_t)) {
- D(("User info response data has the wrong size"));
- return PAM_BUF_ERR;
- }
-
ret = do_pam_conversation(pamh, PAM_TEXT_INFO,
_("System is offline, password change not possible"),
NULL, NULL);
@@ -851,7 +845,7 @@ static int eval_user_info_response(pam_handle_t *pamh, size_t buflen,
ret = user_info_offline_auth_delayed(pamh, buflen, buf);
break;
case SSS_PAM_USER_INFO_OFFLINE_CHPASS:
- ret = user_info_offline_chpass(pamh, buflen, buf);
+ ret = user_info_offline_chpass(pamh);
break;
case SSS_PAM_USER_INFO_CHPASS_ERROR:
ret = user_info_chpass_error(pamh, buflen, buf);
diff --git a/src/tools/nscd.c b/src/tools/nscd.c
index f17fd6acc..365383cb8 100644
--- a/src/tools/nscd.c
+++ b/src/tools/nscd.c
@@ -33,7 +33,7 @@
#endif
#if defined(NSCD_PATH) && defined(HAVE_NSCD)
-int flush_nscd_cache(TALLOC_CTX *mem_ctx, enum nscd_db flush_db)
+int flush_nscd_cache(enum nscd_db flush_db)
{
const char *service;
pid_t nscd_pid;
@@ -90,7 +90,7 @@ done:
}
#else /* defined(NSCD_PATH) && defined(HAVE_NSCD) */
-int flush_nscd_cache(TALLOC_CTX *mem_ctx, enum nscd_db flush_db)
+int flush_nscd_cache(enum nscd_db flush_db)
{
return EOK;
}
diff --git a/src/tools/sss_groupadd.c b/src/tools/sss_groupadd.c
index 1f974cd03..f2e09a100 100644
--- a/src/tools/sss_groupadd.c
+++ b/src/tools/sss_groupadd.c
@@ -110,7 +110,7 @@ int main(int argc, const char **argv)
}
/* groupadd */
- tctx->error = groupadd(tctx, tctx->sysdb, tctx->octx);
+ tctx->error = groupadd(tctx->sysdb, tctx->octx);
if (tctx->error) {
/* cancel transaction */
sysdb_transaction_cancel(tctx->sysdb);
diff --git a/src/tools/sss_sync_ops.c b/src/tools/sss_sync_ops.c
index 717227029..79de8fc8c 100644
--- a/src/tools/sss_sync_ops.c
+++ b/src/tools/sss_sync_ops.c
@@ -52,8 +52,7 @@ struct sync_op_res {
/*
* Generic modify groups member
*/
-static int mod_groups_member(TALLOC_CTX *mem_ctx,
- struct sysdb_ctx *sysdb,
+static int mod_groups_member(struct sysdb_ctx *sysdb,
char **grouplist,
struct ldb_dn *member_dn,
int optype)
@@ -93,11 +92,11 @@ done:
return ret;
}
-#define add_to_groups(memctx, sysdb, data, member_dn) \
- mod_groups_member(memctx, sysdb, data->addgroups, member_dn, \
+#define add_to_groups(sysdb, data, member_dn) \
+ mod_groups_member(sysdb, data->addgroups, member_dn, \
LDB_FLAG_MOD_ADD)
-#define remove_from_groups(memctx, sysdb, data, member_dn) \
- mod_groups_member(memctx, sysdb, data->rmgroups, member_dn, \
+#define remove_from_groups(sysdb, data, member_dn) \
+ mod_groups_member(sysdb, data->rmgroups, member_dn, \
LDB_FLAG_MOD_DELETE)
/*
@@ -229,21 +228,21 @@ int usermod(TALLOC_CTX *mem_ctx,
}
if (data->rmgroups != NULL) {
- ret = remove_from_groups(mem_ctx, sysdb, data, member_dn);
+ ret = remove_from_groups(sysdb, data, member_dn);
if (ret) {
return ret;
}
}
if (data->addgroups != NULL) {
- ret = add_to_groups(mem_ctx, sysdb, data, member_dn);
+ ret = add_to_groups(sysdb, data, member_dn);
if (ret) {
return ret;
}
}
- flush_nscd_cache(mem_ctx, NSCD_DB_PASSWD);
- flush_nscd_cache(mem_ctx, NSCD_DB_GROUP);
+ flush_nscd_cache(NSCD_DB_PASSWD);
+ flush_nscd_cache(NSCD_DB_GROUP);
return EOK;
}
@@ -284,20 +283,20 @@ int groupmod(TALLOC_CTX *mem_ctx,
}
if (data->rmgroups != NULL) {
- ret = remove_from_groups(mem_ctx, sysdb, data, member_dn);
+ ret = remove_from_groups(sysdb, data, member_dn);
if (ret) {
return ret;
}
}
if (data->addgroups != NULL) {
- ret = add_to_groups(mem_ctx, sysdb, data, member_dn);
+ ret = add_to_groups(sysdb, data, member_dn);
if (ret) {
return ret;
}
}
- flush_nscd_cache(mem_ctx, NSCD_DB_GROUP);
+ flush_nscd_cache(NSCD_DB_GROUP);
return EOK;
}
@@ -487,14 +486,14 @@ int useradd(TALLOC_CTX *mem_ctx,
goto done;
}
- ret = add_to_groups(mem_ctx, sysdb, data, member_dn);
+ ret = add_to_groups(sysdb, data, member_dn);
if (ret) {
goto done;
}
}
- flush_nscd_cache(mem_ctx, NSCD_DB_PASSWD);
- flush_nscd_cache(mem_ctx, NSCD_DB_GROUP);
+ flush_nscd_cache(NSCD_DB_PASSWD);
+ flush_nscd_cache(NSCD_DB_GROUP);
done:
return ret;
@@ -522,8 +521,8 @@ int userdel(TALLOC_CTX *mem_ctx,
DEBUG(2, ("Removing user failed: %s (%d)\n", strerror(ret), ret));
}
- flush_nscd_cache(mem_ctx, NSCD_DB_PASSWD);
- flush_nscd_cache(mem_ctx, NSCD_DB_GROUP);
+ flush_nscd_cache(NSCD_DB_PASSWD);
+ flush_nscd_cache(NSCD_DB_GROUP);
return ret;
}
@@ -531,15 +530,14 @@ int userdel(TALLOC_CTX *mem_ctx,
/*
* Public interface for adding groups
*/
-int groupadd(TALLOC_CTX *mem_ctx,
- struct sysdb_ctx *sysdb,
- struct ops_ctx *data)
+int groupadd(struct sysdb_ctx *sysdb,
+ struct ops_ctx *data)
{
int ret;
ret = sysdb_add_group(sysdb, data->name, data->gid, NULL, 0, 0);
if (ret == EOK) {
- flush_nscd_cache(mem_ctx, NSCD_DB_GROUP);
+ flush_nscd_cache(NSCD_DB_GROUP);
}
return ret;
}
@@ -566,7 +564,7 @@ int groupdel(TALLOC_CTX *mem_ctx,
DEBUG(2, ("Removing group failed: %s (%d)\n", strerror(ret), ret));
}
- flush_nscd_cache(mem_ctx, NSCD_DB_GROUP);
+ flush_nscd_cache(NSCD_DB_GROUP);
return ret;
}
diff --git a/src/tools/sss_sync_ops.h b/src/tools/sss_sync_ops.h
index fcf7e223e..95722a0b6 100644
--- a/src/tools/sss_sync_ops.h
+++ b/src/tools/sss_sync_ops.h
@@ -82,9 +82,8 @@ int usermod(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
struct ops_ctx *data);
-int groupadd(TALLOC_CTX *mem_ctx,
- struct sysdb_ctx *sysdb,
- struct ops_ctx *data);
+int groupadd(struct sysdb_ctx *sysdb,
+ struct ops_ctx *data);
int groupdel(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
struct ops_ctx *data);
diff --git a/src/tools/sss_useradd.c b/src/tools/sss_useradd.c
index 747ebaf59..5ca2612a3 100644
--- a/src/tools/sss_useradd.c
+++ b/src/tools/sss_useradd.c
@@ -220,10 +220,8 @@ int main(int argc, const char **argv)
}
}
- ret = create_homedir(tctx,
- tctx->octx->skeldir,
+ ret = create_homedir(tctx->octx->skeldir,
tctx->octx->home,
- tctx->octx->name,
tctx->octx->uid,
tctx->octx->gid,
tctx->octx->umask);
diff --git a/src/tools/tools_util.c b/src/tools/tools_util.c
index 7dfdecf8c..404aef259 100644
--- a/src/tools/tools_util.c
+++ b/src/tools/tools_util.c
@@ -465,10 +465,8 @@ fail:
return ret;
}
-int create_homedir(TALLOC_CTX *mem_ctx,
- const char *skeldir,
+int create_homedir(const char *skeldir,
const char *homedir,
- const char *username,
uid_t uid,
gid_t gid,
mode_t default_umask)
diff --git a/src/tools/tools_util.h b/src/tools/tools_util.h
index e8b253616..fccd9d96b 100644
--- a/src/tools/tools_util.h
+++ b/src/tools/tools_util.h
@@ -80,10 +80,8 @@ int check_group_names(struct tools_ctx *tctx,
char **grouplist,
char **badgroup);
-int create_homedir(TALLOC_CTX *mem_ctx,
- const char *skeldir,
+int create_homedir(const char *skeldir,
const char *homedir,
- const char *username,
uid_t uid,
gid_t gid,
mode_t default_umask);
@@ -114,7 +112,7 @@ enum nscd_db {
NSCD_DB_GROUP
};
-int flush_nscd_cache(TALLOC_CTX *mem_ctx, enum nscd_db flush_db);
+int flush_nscd_cache(enum nscd_db flush_db);
/* from selinux.c */
int selinux_file_context(const char *dst_name);
diff --git a/src/util/crypto/nss/nss_obfuscate.c b/src/util/crypto/nss/nss_obfuscate.c
index 54cec0997..db10be606 100644
--- a/src/util/crypto/nss/nss_obfuscate.c
+++ b/src/util/crypto/nss/nss_obfuscate.c
@@ -181,8 +181,7 @@ done:
return ret;
}
-static int nss_encrypt_decrypt_init(TALLOC_CTX *mem_ctx,
- struct crypto_mech_data *mech_props,
+static int nss_encrypt_decrypt_init(struct crypto_mech_data *mech_props,
bool do_encrypt,
struct sss_nss_crypto_ctx *cctx)
{
@@ -315,7 +314,7 @@ int sss_password_encrypt(TALLOC_CTX *mem_ctx, const char *password, int plen,
goto done;
}
- ret = nss_encrypt_decrypt_init(tmp_ctx, mech_props, true, cctx);
+ ret = nss_encrypt_decrypt_init(mech_props, true, cctx);
if (ret) {
DEBUG(1, ("Cannot initialize NSS context properties\n"));
goto done;
@@ -500,7 +499,7 @@ int sss_password_decrypt(TALLOC_CTX *mem_ctx, char *b64encoded,
MAKE_SECITEM(ivbuf, mech_props->bsize, cctx->iv);
MAKE_SECITEM(keybuf, mech_props->keylen, cctx->key);
- ret = nss_encrypt_decrypt_init(tmp_ctx, mech_props, false, cctx);
+ ret = nss_encrypt_decrypt_init(mech_props, false, cctx);
if (ret) {
goto done;
}