summaryrefslogtreecommitdiff
path: root/src/providers
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ipa/ipa_access.c3
-rw-r--r--src/providers/ipa/ipa_auth.c1
-rw-r--r--src/providers/ipa/ipa_hbac_common.c12
-rw-r--r--src/providers/ipa/ipa_hbac_hosts.c4
-rw-r--r--src/providers/ipa/ipa_hbac_services.c4
-rw-r--r--src/providers/ipa/ipa_hbac_users.c5
-rw-r--r--src/providers/krb5/krb5_access.c4
-rw-r--r--src/providers/krb5/krb5_auth.c16
-rw-r--r--src/providers/krb5/krb5_renew_tgt.c3
-rw-r--r--src/providers/ldap/ldap_auth.c3
-rw-r--r--src/providers/ldap/ldap_common.c4
-rw-r--r--src/providers/ldap/ldap_id.c13
-rw-r--r--src/providers/ldap/ldap_id_cleanup.c11
-rw-r--r--src/providers/ldap/ldap_id_enum.c4
-rw-r--r--src/providers/ldap/ldap_id_netgroup.c2
-rw-r--r--src/providers/ldap/sdap_access.c5
-rw-r--r--src/providers/ldap/sdap_async_accounts.c49
-rw-r--r--src/providers/ldap/sdap_async_netgroups.c2
-rw-r--r--src/providers/proxy/proxy_auth.c1
-rw-r--r--src/providers/proxy/proxy_id.c18
-rw-r--r--src/providers/proxy/proxy_netgroup.c2
-rw-r--r--src/providers/simple/simple_access.c4
22 files changed, 69 insertions, 101 deletions
diff --git a/src/providers/ipa/ipa_access.c b/src/providers/ipa/ipa_access.c
index 3bd37732..74136d31 100644
--- a/src/providers/ipa/ipa_access.c
+++ b/src/providers/ipa/ipa_access.c
@@ -605,7 +605,6 @@ static errno_t hbac_get_cached_rules(TALLOC_CTX *mem_ctx,
{
errno_t ret;
struct sysdb_ctx *sysdb = hbac_ctx_sysdb(hbac_ctx);
- struct sss_domain_info *domain = hbac_ctx_be(hbac_ctx)->domain;
size_t count;
struct ldb_message **msgs;
TALLOC_CTX *tmp_ctx;
@@ -635,7 +634,7 @@ static errno_t hbac_get_cached_rules(TALLOC_CTX *mem_ctx,
goto done;
}
- ret = sysdb_search_custom(mem_ctx, sysdb, domain, filter,
+ ret = sysdb_search_custom(mem_ctx, sysdb, filter,
HBAC_RULES_SUBDIR, attrs,
&count, &msgs);
if (ret != EOK && ret != ENOENT) {
diff --git a/src/providers/ipa/ipa_auth.c b/src/providers/ipa/ipa_auth.c
index d8d8ad5a..f0bdd429 100644
--- a/src/providers/ipa/ipa_auth.c
+++ b/src/providers/ipa/ipa_auth.c
@@ -363,7 +363,6 @@ static void ipa_get_migration_flag_done(struct tevent_req *req)
attrs[1] = NULL;
ret = sysdb_search_user_by_name(state, state->be_req->be_ctx->sysdb,
- state->be_req->be_ctx->domain,
state->pd->user, attrs, &user_msg);
if (ret != EOK) {
DEBUG(1, ("sysdb_search_user_by_name failed.\n"));
diff --git a/src/providers/ipa/ipa_hbac_common.c b/src/providers/ipa/ipa_hbac_common.c
index 4633f2f9..36c67e49 100644
--- a/src/providers/ipa/ipa_hbac_common.c
+++ b/src/providers/ipa/ipa_hbac_common.c
@@ -77,8 +77,7 @@ ipa_hbac_save_list(struct sysdb_ctx *sysdb, bool delete_subdir,
}
DEBUG(9, ("Object name: [%s].\n", object_name));
- ret = sysdb_store_custom(tmp_ctx, sysdb, domain, object_name, subdir,
- list[c]);
+ ret = sysdb_store_custom(tmp_ctx, sysdb, object_name, subdir, list[c]);
if (ret != EOK) {
DEBUG(1, ("sysdb_store_custom failed.\n"));
goto done;
@@ -210,7 +209,7 @@ ipa_hbac_sysdb_save(struct sysdb_ctx *sysdb, struct sss_domain_info *domain,
goto done;
}
- ret = sysdb_search_custom(tmp_ctx, sysdb, domain,
+ ret = sysdb_search_custom(tmp_ctx, sysdb,
member_filter, primary_subdir,
NULL, &member_count, &members);
talloc_zfree(member_filter);
@@ -625,8 +624,7 @@ hbac_eval_user_element(TALLOC_CTX *mem_ctx,
* This will give us the list of both POSIX and
* non-POSIX groups that this user belongs to.
*/
- ret = sysdb_search_user_by_name(tmp_ctx, sysdb, domain,
- users->name, attrs, &msg);
+ ret = sysdb_search_user_by_name(tmp_ctx, sysdb, users->name, attrs, &msg);
if (ret != EOK) {
DEBUG(1, ("Could not determine user memberships for [%s]\n",
users->name));
@@ -734,7 +732,7 @@ hbac_eval_service_element(TALLOC_CTX *mem_ctx,
}
/* Find the service groups */
- ret = sysdb_asq_search(tmp_ctx, sysdb, domain, svc_dn,
+ ret = sysdb_asq_search(tmp_ctx, sysdb, svc_dn,
service_filter, SYSDB_MEMBEROF,
attrs, &count, &msgs);
if (ret != EOK && ret != ENOENT) {
@@ -835,7 +833,7 @@ hbac_eval_host_element(TALLOC_CTX *mem_ctx,
}
/* Find the host groups */
- ret = sysdb_asq_search(tmp_ctx, sysdb, domain, host_dn,
+ ret = sysdb_asq_search(tmp_ctx, sysdb, host_dn,
host_filter, SYSDB_MEMBEROF,
attrs, &count, &msgs);
if (ret != EOK && ret != ENOENT) {
diff --git a/src/providers/ipa/ipa_hbac_hosts.c b/src/providers/ipa/ipa_hbac_hosts.c
index 4e753f37..15522f49 100644
--- a/src/providers/ipa/ipa_hbac_hosts.c
+++ b/src/providers/ipa/ipa_hbac_hosts.c
@@ -331,7 +331,7 @@ static errno_t hbac_host_attrs_to_rule(TALLOC_CTX *mem_ctx,
}
/* First check if this is a specific host */
- ret = sysdb_search_custom(tmp_ctx, sysdb, domain, filter,
+ ret = sysdb_search_custom(tmp_ctx, sysdb, filter,
HBAC_HOSTS_SUBDIR, attrs,
&count, &msgs);
if (ret != EOK && ret != ENOENT) goto done;
@@ -367,7 +367,7 @@ static errno_t hbac_host_attrs_to_rule(TALLOC_CTX *mem_ctx,
num_hosts++;
} else { /* ret == ENOENT */
/* Check if this is a hostgroup */
- ret = sysdb_search_custom(tmp_ctx, sysdb, domain, filter,
+ ret = sysdb_search_custom(tmp_ctx, sysdb, filter,
HBAC_HOSTGROUPS_SUBDIR, attrs,
&count, &msgs);
if (ret != EOK && ret != ENOENT) goto done;
diff --git a/src/providers/ipa/ipa_hbac_services.c b/src/providers/ipa/ipa_hbac_services.c
index df276b86..fa580977 100644
--- a/src/providers/ipa/ipa_hbac_services.c
+++ b/src/providers/ipa/ipa_hbac_services.c
@@ -345,7 +345,7 @@ hbac_service_attrs_to_rule(TALLOC_CTX *mem_ctx,
}
/* First check if this is a specific service */
- ret = sysdb_search_custom(tmp_ctx, sysdb, domain, filter,
+ ret = sysdb_search_custom(tmp_ctx, sysdb, filter,
HBAC_SERVICES_SUBDIR, attrs,
&count, &msgs);
if (ret != EOK && ret != ENOENT) goto done;
@@ -380,7 +380,7 @@ hbac_service_attrs_to_rule(TALLOC_CTX *mem_ctx,
num_services++;
} else { /* ret == ENOENT */
/* Check if this is a service group */
- ret = sysdb_search_custom(tmp_ctx, sysdb, domain, filter,
+ ret = sysdb_search_custom(tmp_ctx, sysdb, filter,
HBAC_SERVICEGROUPS_SUBDIR, attrs,
&count, &msgs);
if (ret != EOK && ret != ENOENT) goto done;
diff --git a/src/providers/ipa/ipa_hbac_users.c b/src/providers/ipa/ipa_hbac_users.c
index 9b7cadb2..888f866d 100644
--- a/src/providers/ipa/ipa_hbac_users.c
+++ b/src/providers/ipa/ipa_hbac_users.c
@@ -232,8 +232,7 @@ hbac_user_attrs_to_rule(TALLOC_CTX *mem_ctx,
}
/* First check if this is a user */
- ret = sysdb_search_users(tmp_ctx, sysdb, domain,
- filter, attrs, &count, &msgs);
+ ret = sysdb_search_users(tmp_ctx, sysdb, filter, attrs, &count, &msgs);
if (ret != EOK && ret != ENOENT) goto done;
if (ret == EOK && count == 0) {
ret = ENOENT;
@@ -265,7 +264,7 @@ hbac_user_attrs_to_rule(TALLOC_CTX *mem_ctx,
num_users++;
} else {
/* Check if it is a group instead */
- ret = sysdb_search_groups(tmp_ctx, sysdb, domain,
+ ret = sysdb_search_groups(tmp_ctx, sysdb,
filter, attrs, &count, &msgs);
if (ret != EOK && ret != ENOENT) goto done;
if (ret == EOK && count == 0) {
diff --git a/src/providers/krb5/krb5_access.c b/src/providers/krb5/krb5_access.c
index 4becd03c..afa3a89d 100644
--- a/src/providers/krb5/krb5_access.c
+++ b/src/providers/krb5/krb5_access.c
@@ -87,8 +87,8 @@ struct tevent_req *krb5_access_send(TALLOC_CTX *mem_ctx,
attrs[2] = SYSDB_GIDNUM;
attrs[3] = NULL;
- ret = sysdb_get_user_attr(state, be_ctx->sysdb, be_ctx->domain,
- state->pd->user, attrs, &res);
+ ret = sysdb_get_user_attr(state, be_ctx->sysdb, state->pd->user, attrs,
+ &res);
if (ret) {
DEBUG(5, ("sysdb search for upn of user [%s] failed.\n", pd->user));
goto done;
diff --git a/src/providers/krb5/krb5_auth.c b/src/providers/krb5/krb5_auth.c
index a7444d30..c8dc8652 100644
--- a/src/providers/krb5/krb5_auth.c
+++ b/src/providers/krb5/krb5_auth.c
@@ -193,8 +193,7 @@ static int krb5_mod_ccname(TALLOC_CTX *mem_ctx,
goto done;
}
- ret = sysdb_set_user_attr(tmpctx, sysdb,
- domain, name, attrs, mod_op);
+ ret = sysdb_set_user_attr(tmpctx, sysdb, name, attrs, mod_op);
if (ret != EOK) {
DEBUG(6, ("Error: %d (%s)\n", ret, strerror(ret)));
sysdb_transaction_cancel(sysdb);
@@ -408,8 +407,8 @@ struct tevent_req *krb5_auth_send(TALLOC_CTX *mem_ctx,
}
kr = state->kr;
- ret = sysdb_get_user_attr(state, be_ctx->sysdb, be_ctx->domain,
- state->pd->user, attrs, &res);
+ ret = sysdb_get_user_attr(state, be_ctx->sysdb, state->pd->user, attrs,
+ &res);
if (ret) {
DEBUG(5, ("sysdb search for upn of user [%s] failed.\n", pd->user));
state->pam_status = PAM_SYSTEM_ERR;
@@ -1084,8 +1083,7 @@ static void krb5_save_ccname_done(struct tevent_req *req)
talloc_set_destructor((TALLOC_CTX *)password, password_destructor);
- ret = sysdb_cache_password(state, state->be_ctx->sysdb,
- state->be_ctx->domain, pd->user,
+ ret = sysdb_cache_password(state, state->be_ctx->sysdb, pd->user,
password);
if (ret) {
DEBUG(2, ("Failed to cache password, offline auth may not work."
@@ -1114,9 +1112,9 @@ static void krb5_pam_handler_cache_auth_step(struct tevent_req *req)
struct krb5_ctx *krb5_ctx = state->kr->krb5_ctx;
int ret;
- ret = sysdb_cache_auth(state, state->be_ctx->sysdb, state->be_ctx->domain,
- pd->user, pd->authtok, pd->authtok_size,
- state->be_ctx->cdb, true, NULL, NULL);
+ ret = sysdb_cache_auth(state, state->be_ctx->sysdb, pd->user, pd->authtok,
+ pd->authtok_size, state->be_ctx->cdb, true, NULL,
+ NULL);
if (ret != EOK) {
DEBUG(1, ("Offline authentication failed\n"));
state->pam_status = PAM_SYSTEM_ERR;
diff --git a/src/providers/krb5/krb5_renew_tgt.c b/src/providers/krb5/krb5_renew_tgt.c
index 557ec3e1..2ad5592e 100644
--- a/src/providers/krb5/krb5_renew_tgt.c
+++ b/src/providers/krb5/krb5_renew_tgt.c
@@ -390,8 +390,7 @@ static errno_t check_ccache_files(struct renew_tgt_ctx *renew_tgt_ctx)
}
ret = sysdb_search_users(tmp_ctx, renew_tgt_ctx->be_ctx->sysdb,
- renew_tgt_ctx->be_ctx->domain, ccache_filter,
- ccache_attrs, &msgs_count, &msgs);
+ ccache_filter, ccache_attrs, &msgs_count, &msgs);
if (ret != EOK) {
DEBUG(1, ("sysdb_search_users failed.\n"));
goto done;
diff --git a/src/providers/ldap/ldap_auth.c b/src/providers/ldap/ldap_auth.c
index 5857e537..efc9f527 100644
--- a/src/providers/ldap/ldap_auth.c
+++ b/src/providers/ldap/ldap_auth.c
@@ -376,7 +376,7 @@ static int get_user_dn(TALLOC_CTX *memctx,
attrs[9] = SYSDB_PWD_ATTRIBUTE;
attrs[10] = NULL;
- ret = sysdb_get_user_attr(tmpctx, sysdb, dom, username, attrs, &res);
+ ret = sysdb_get_user_attr(tmpctx, sysdb, username, attrs, &res);
if (ret) {
goto done;
}
@@ -1100,7 +1100,6 @@ static void sdap_pam_auth_done(struct tevent_req *req)
ret = sysdb_cache_password(state,
state->breq->be_ctx->sysdb,
- state->breq->be_ctx->domain,
state->username, password);
/* password caching failures are not fatal errors */
diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c
index 78176ba8..f26a428d 100644
--- a/src/providers/ldap/ldap_common.c
+++ b/src/providers/ldap/ldap_common.c
@@ -492,9 +492,7 @@ int sdap_id_setup_tasks(struct sdap_id_ctx *ctx)
* clients requesting get*ent information won't get an
* immediate reply with no entries
*/
- ret = sysdb_has_enumerated(ctx->be->sysdb,
- ctx->be->domain,
- &has_enumerated);
+ ret = sysdb_has_enumerated(ctx->be->sysdb, &has_enumerated);
if (ret != EOK) {
return ret;
}
diff --git a/src/providers/ldap/ldap_id.c b/src/providers/ldap/ldap_id.c
index be347e17..9525224b 100644
--- a/src/providers/ldap/ldap_id.c
+++ b/src/providers/ldap/ldap_id.c
@@ -227,8 +227,7 @@ static void users_get_done(struct tevent_req *subreq)
tevent_req_error(req, ret);
return;
case BE_FILTER_NAME:
- ret = sysdb_delete_user(state, state->sysdb,
- state->domain, state->name, 0);
+ ret = sysdb_delete_user(state, state->sysdb, state->name, 0);
if (ret != EOK && ret != ENOENT) {
tevent_req_error(req, ret);
return;
@@ -242,8 +241,7 @@ static void users_get_done(struct tevent_req *subreq)
return;
}
- ret = sysdb_delete_user(state, state->sysdb,
- state->domain, NULL, uid);
+ ret = sysdb_delete_user(state, state->sysdb, NULL, uid);
if (ret != EOK && ret != ENOENT) {
tevent_req_error(req, ret);
return;
@@ -472,8 +470,7 @@ static void groups_get_done(struct tevent_req *subreq)
tevent_req_error(req, ret);
return;
case BE_FILTER_NAME:
- ret = sysdb_delete_group(state, state->sysdb,
- state->domain, state->name, 0);
+ ret = sysdb_delete_group(state, state->sysdb, state->name, 0);
if (ret != EOK && ret != ENOENT) {
tevent_req_error(req, ret);
return;
@@ -487,8 +484,7 @@ static void groups_get_done(struct tevent_req *subreq)
return;
}
- ret = sysdb_delete_group(state, state->sysdb,
- state->domain, NULL, gid);
+ ret = sysdb_delete_group(state, state->sysdb, NULL, gid);
if (ret != EOK && ret != ENOENT) {
tevent_req_error(req, ret);
return;
@@ -658,7 +654,6 @@ static void groups_by_user_done(struct tevent_req *subreq)
if (ret == ENOENT) {
ret = sysdb_delete_user(state,
state->ctx->be->sysdb,
- state->ctx->be->domain,
state->name, 0);
if (ret != EOK && ret != ENOENT) {
tevent_req_error(req, ret);
diff --git a/src/providers/ldap/ldap_id_cleanup.c b/src/providers/ldap/ldap_id_cleanup.c
index d31dace5..fc659271 100644
--- a/src/providers/ldap/ldap_id_cleanup.c
+++ b/src/providers/ldap/ldap_id_cleanup.c
@@ -245,7 +245,6 @@ static int cleanup_users(TALLOC_CTX *memctx, struct sdap_id_ctx *ctx)
{
TALLOC_CTX *tmpctx;
struct sysdb_ctx *sysdb = ctx->be->sysdb;
- struct sss_domain_info *domain = ctx->be->domain;
const char *attrs[] = { SYSDB_NAME, SYSDB_UIDNUM, NULL };
time_t now = time(NULL);
char *subfilter = NULL;
@@ -291,7 +290,7 @@ static int cleanup_users(TALLOC_CTX *memctx, struct sdap_id_ctx *ctx)
}
ret = sysdb_search_users(tmpctx, sysdb,
- domain, subfilter, attrs, &count, &msgs);
+ subfilter, attrs, &count, &msgs);
if (ret) {
if (ret == ENOENT) {
ret = EOK;
@@ -337,7 +336,7 @@ static int cleanup_users(TALLOC_CTX *memctx, struct sdap_id_ctx *ctx)
/* If not logged in or cannot check the table, delete him */
DEBUG(9, ("About to delete user %s\n", name));
- ret = sysdb_delete_user(tmpctx, sysdb, domain, name, 0);
+ ret = sysdb_delete_user(tmpctx, sysdb, name, 0);
if (ret) {
goto done;
}
@@ -412,7 +411,7 @@ static int cleanup_groups(TALLOC_CTX *memctx,
}
ret = sysdb_search_groups(tmpctx, sysdb,
- domain, subfilter, attrs, &count, &msgs);
+ subfilter, attrs, &count, &msgs);
if (ret) {
if (ret == ENOENT) {
ret = EOK;
@@ -453,7 +452,7 @@ static int cleanup_groups(TALLOC_CTX *memctx,
}
ret = sysdb_search_users(tmpctx, sysdb,
- domain, subfilter, NULL, &u_count, &u_msgs);
+ subfilter, NULL, &u_count, &u_msgs);
if (ret == ENOENT) {
const char *name;
@@ -466,7 +465,7 @@ static int cleanup_groups(TALLOC_CTX *memctx,
}
DEBUG(8, ("About to delete group %s\n", name));
- ret = sysdb_delete_group(tmpctx, sysdb, domain, name, 0);
+ ret = sysdb_delete_group(tmpctx, sysdb, name, 0);
if (ret) {
DEBUG(2, ("Group delete returned %d (%s)\n",
ret, strerror(ret)));
diff --git a/src/providers/ldap/ldap_id_enum.c b/src/providers/ldap/ldap_id_enum.c
index 40f3a2b6..eced42a8 100644
--- a/src/providers/ldap/ldap_id_enum.c
+++ b/src/providers/ldap/ldap_id_enum.c
@@ -147,9 +147,7 @@ static void ldap_id_enumerate_reschedule(struct tevent_req *req)
* process on the next SSSD service restart (to avoid
* slowing down system boot-up
*/
- ret = sysdb_set_enumerated(ctx->be->sysdb,
- ctx->be->domain,
- true);
+ ret = sysdb_set_enumerated(ctx->be->sysdb, true);
if (ret != EOK) {
DEBUG(1, ("Could not mark domain as having enumerated.\n"));
/* This error is non-fatal, so continue */
diff --git a/src/providers/ldap/ldap_id_netgroup.c b/src/providers/ldap/ldap_id_netgroup.c
index 7b9ad0f1..6e21956d 100644
--- a/src/providers/ldap/ldap_id_netgroup.c
+++ b/src/providers/ldap/ldap_id_netgroup.c
@@ -203,7 +203,7 @@ static void netgroup_get_done(struct tevent_req *subreq)
}
if (ret == ENOENT) {
- ret = sysdb_delete_netgroup(state->sysdb, state->domain, state->name);
+ ret = sysdb_delete_netgroup(state->sysdb, state->name);
if (ret != EOK && ret != ENOENT) {
tevent_req_error(req, ret);
return;
diff --git a/src/providers/ldap/sdap_access.c b/src/providers/ldap/sdap_access.c
index 9bb2f2ef..0ac0f639 100644
--- a/src/providers/ldap/sdap_access.c
+++ b/src/providers/ldap/sdap_access.c
@@ -172,9 +172,7 @@ static struct tevent_req *sdap_access_send(TALLOC_CTX *mem_ctx,
}
/* Get original user DN */
- ret = sysdb_get_user_attr(state, be_ctx->sysdb, be_ctx->domain,
- pd->user, attrs,
- &res);
+ ret = sysdb_get_user_attr(state, be_ctx->sysdb, pd->user, attrs, &res);
if (ret != EOK) {
if (ret == ENOENT) {
/* If we can't find the user, return permission denied */
@@ -1062,7 +1060,6 @@ static void sdap_access_filter_get_access_done(struct tevent_req *subreq)
ret = sysdb_set_user_attr(attrs,
state->be_ctx->sysdb,
- state->be_ctx->domain,
state->username,
attrs, SYSDB_MOD_REP);
if (ret != EOK) {
diff --git a/src/providers/ldap/sdap_async_accounts.c b/src/providers/ldap/sdap_async_accounts.c
index bea965b4..a6907a34 100644
--- a/src/providers/ldap/sdap_async_accounts.c
+++ b/src/providers/ldap/sdap_async_accounts.c
@@ -298,7 +298,7 @@ static int sdap_save_user(TALLOC_CTX *memctx,
DEBUG(6, ("Storing info for user %s\n", name));
- ret = sysdb_store_user(user_attrs, ctx, dom,
+ ret = sysdb_store_user(user_attrs, ctx,
name, pwd, uid, gid, gecos, homedir, shell,
user_attrs, missing, cache_timeout);
if (ret) goto fail;
@@ -666,7 +666,6 @@ done:
static errno_t
sdap_store_group_with_gid(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *ctx,
- struct sss_domain_info *domain,
const char *name,
gid_t gid,
struct sysdb_attrs *group_attrs,
@@ -685,7 +684,7 @@ sdap_store_group_with_gid(TALLOC_CTX *mem_ctx,
}
}
- ret = sysdb_store_group(mem_ctx, ctx, domain,
+ ret = sysdb_store_group(mem_ctx, ctx,
name, gid, group_attrs,
cache_timeout);
if (ret) {
@@ -857,7 +856,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(group_attrs, ctx,
name, gid, group_attrs,
dp_opt_get_int(opts->basic,
SDAP_ENTRY_CACHE_TIMEOUT),
@@ -929,8 +928,7 @@ static int sdap_save_grpmem(TALLOC_CTX *memctx,
DEBUG(6, ("Storing members for group %s\n", name));
- ret = sysdb_store_group(memctx, ctx, dom,
- name, 0, group_attrs,
+ ret = sysdb_store_group(memctx, ctx, name, 0, group_attrs,
dp_opt_get_int(opts->basic,
SDAP_ENTRY_CACHE_TIMEOUT));
if (ret) goto fail;
@@ -1315,8 +1313,7 @@ sdap_process_group_members_2307(struct sdap_process_group_state *state,
/* We need to skip over zero-length usernames */
if (member_name[0] == '\0') continue;
- ret = sysdb_search_user_by_name(state, state->sysdb,
- state->dom, member_name,
+ ret = sysdb_search_user_by_name(state, state->sysdb, member_name,
NULL, &msg);
if (ret == EOK) {
strdn = sysdb_user_strdn(state->sysdb_dns->values,
@@ -1457,7 +1454,7 @@ sdap_process_missing_member_2307(struct sdap_process_group_state *state,
*in_transaction = true;
}
- ret = sysdb_add_fake_user(state->sysdb, state->dom, username, NULL);
+ ret = sysdb_add_fake_user(state->sysdb, username, NULL);
if (ret != EOK) {
DEBUG(1, ("Cannot store fake user entry: [%d]: %s\n",
ret, strerror(ret)));
@@ -2025,7 +2022,7 @@ static errno_t sdap_nested_group_populate_users(struct sysdb_ctx *sysdb,
ret = ENOMEM;
goto done;
}
- ret = sysdb_search_users(tmp_ctx, sysdb, dom, filter,
+ ret = sysdb_search_users(tmp_ctx, sysdb, filter,
search_attrs, &count, &msgs);
talloc_zfree(filter);
talloc_zfree(clean_orig_dn);
@@ -2056,12 +2053,12 @@ static errno_t sdap_nested_group_populate_users(struct sysdb_ctx *sysdb,
ret = sysdb_attrs_add_string(attrs, SYSDB_NAME, username);
if (ret) goto done;
ret = sysdb_set_user_attr(tmp_ctx, sysdb,
- dom, sysdb_name, attrs, SYSDB_MOD_REP);
+ sysdb_name, attrs, SYSDB_MOD_REP);
if (ret != EOK) goto done;
}
/* If the entry does not exist add a fake user record */
- ret = sysdb_add_fake_user(sysdb, dom, username, original_dn);
+ ret = sysdb_add_fake_user(sysdb, username, original_dn);
if (ret != EOK) {
DEBUG(1, ("Cannot store fake user entry, ignoring: [%d]: %s\n",
ret, strerror(ret)));
@@ -2130,7 +2127,7 @@ static errno_t sdap_add_incomplete_groups(struct sysdb_ctx *sysdb,
in_transaction = true;
for (i=0; groupnames[i]; i++) {
- ret = sysdb_search_group_by_name(tmp_ctx, sysdb, dom,
+ ret = sysdb_search_group_by_name(tmp_ctx, sysdb,
groupnames[i], NULL, &msg);
if (ret == EOK) {
continue;
@@ -2190,7 +2187,7 @@ static errno_t sdap_add_incomplete_groups(struct sysdb_ctx *sysdb,
}
DEBUG(8, ("Adding fake group %s to sysdb\n", name));
- ret = sysdb_add_incomplete_group(sysdb, dom, name,
+ ret = sysdb_add_incomplete_group(sysdb, name,
gid, original_dn, posix);
if (ret != EOK) {
goto fail;
@@ -2280,8 +2277,7 @@ static int sdap_initgr_common_store(struct sysdb_ctx *sysdb,
}
DEBUG(8, ("Updating memberships for %s\n", name));
- ret = sysdb_update_members(sysdb, dom, name,
- type,
+ ret = sysdb_update_members(sysdb, name, type,
(const char *const *) add_groups,
(const char *const *) del_groups);
if (ret != EOK) {
@@ -2412,7 +2408,7 @@ static void sdap_initgr_rfc2307_process(struct tevent_req *subreq)
/* Search for all groups for which this user is a member */
attrs[0] = SYSDB_MEMBEROF;
attrs[1] = NULL;
- ret = sysdb_search_user_by_name(state, state->sysdb, state->dom,
+ ret = sysdb_search_user_by_name(state, state->sysdb,
state->name, attrs, &msg);
if (ret != EOK) {
tevent_req_error(req, ret);
@@ -3833,8 +3829,7 @@ sdap_nested_group_check_cache(TALLOC_CTX *mem_ctx,
}
/* Try users first */
- ret = sysdb_search_users(tmp_ctx, sysdb, domain, filter,
- attrs, &count, &msgs);
+ ret = sysdb_search_users(tmp_ctx, sysdb, filter, attrs, &count, &msgs);
if (ret != EOK && ret != ENOENT) {
ret = EIO;
goto fail;
@@ -3880,8 +3875,7 @@ sdap_nested_group_check_cache(TALLOC_CTX *mem_ctx,
/* It wasn't a user. Check whether it's a group */
if (ret == EOK) talloc_zfree(msgs);
- ret = sysdb_search_groups(tmp_ctx, sysdb, domain,
- filter, attrs, &count, &msgs);
+ ret = sysdb_search_groups(tmp_ctx, sysdb, filter, attrs, &count, &msgs);
if (ret != EOK && ret != ENOENT) {
ret = EIO;
goto fail;
@@ -4737,8 +4731,8 @@ errno_t save_rfc2307bis_user_memberships(
}
talloc_free(sanitized_dn);
- ret = sysdb_search_groups(tmp_ctx, state->sysdb, state->dom,
- filter, attrs, &reply_count, &replies);
+ ret = sysdb_search_groups(tmp_ctx, state->sysdb, filter, attrs,
+ &reply_count, &replies);
if (ret != EOK && ret != ENOENT) {
goto error;
} if (ret == ENOENT) {
@@ -4802,8 +4796,7 @@ errno_t save_rfc2307bis_user_memberships(
}
DEBUG(8, ("Updating memberships for %s\n", state->name));
- ret = sysdb_update_members(state->sysdb, state->dom, state->name,
- SYSDB_MEMBER_USER,
+ ret = sysdb_update_members(state->sysdb, state->name, SYSDB_MEMBER_USER,
(const char *const *)add_groups,
(const char *const *)del_groups);
if (ret != EOK) {
@@ -5229,8 +5222,7 @@ static errno_t rfc2307bis_nested_groups_update_sysdb(
}
talloc_free(sanitized_dn);
- ret = sysdb_search_groups(tmp_ctx, state->sysdb, state->dom,
- filter, attrs,
+ ret = sysdb_search_groups(tmp_ctx, state->sysdb, filter, attrs,
&reply_count, &replies);
if (ret != EOK && ret != ENOENT) {
goto error;
@@ -5296,8 +5288,7 @@ static errno_t rfc2307bis_nested_groups_update_sysdb(
talloc_free(sysdb_grouplist);
DEBUG(8, ("Updating memberships for %s\n", name));
- ret = sysdb_update_members(state->sysdb, state->dom, name,
- SYSDB_MEMBER_GROUP,
+ ret = sysdb_update_members(state->sysdb, name, SYSDB_MEMBER_GROUP,
(const char *const *)add_groups,
(const char *const *)del_groups);
if (ret != EOK) {
diff --git a/src/providers/ldap/sdap_async_netgroups.c b/src/providers/ldap/sdap_async_netgroups.c
index 1f6c6d06..ff776289 100644
--- a/src/providers/ldap/sdap_async_netgroups.c
+++ b/src/providers/ldap/sdap_async_netgroups.c
@@ -165,7 +165,7 @@ static errno_t sdap_save_netgroup(TALLOC_CTX *memctx,
DEBUG(6, ("Storing info for netgroup %s\n", name));
- ret = sysdb_add_netgroup(ctx, dom, name, NULL, netgroup_attrs,
+ ret = sysdb_add_netgroup(ctx, name, NULL, netgroup_attrs,
dp_opt_get_int(opts->basic,
SDAP_ENTRY_CACHE_TIMEOUT));
if (ret) goto fail;
diff --git a/src/providers/proxy/proxy_auth.c b/src/providers/proxy/proxy_auth.c
index b3b878cf..57eb483c 100644
--- a/src/providers/proxy/proxy_auth.c
+++ b/src/providers/proxy/proxy_auth.c
@@ -761,7 +761,6 @@ static void proxy_child_done(struct tevent_req *req)
ret = sysdb_cache_password(client_ctx,
client_ctx->be_req->be_ctx->sysdb,
- client_ctx->be_req->be_ctx->domain,
pd->user, password);
/* password caching failures are not fatal errors */
diff --git a/src/providers/proxy/proxy_id.c b/src/providers/proxy/proxy_id.c
index 5ce9095b..b4dcac7c 100644
--- a/src/providers/proxy/proxy_id.c
+++ b/src/providers/proxy/proxy_id.c
@@ -97,7 +97,7 @@ static int get_pw_name(TALLOC_CTX *mem_ctx,
break;
}
- ret = sysdb_store_user(tmpctx, sysdb, dom,
+ ret = sysdb_store_user(tmpctx, sysdb,
pwd->pw_name,
pwd->pw_passwd,
pwd->pw_uid,
@@ -212,7 +212,7 @@ static int get_pw_uid(TALLOC_CTX *mem_ctx,
break;
}
- ret = sysdb_store_user(tmpctx, sysdb, dom,
+ ret = sysdb_store_user(tmpctx, sysdb,
pwd->pw_name,
pwd->pw_passwd,
pwd->pw_uid,
@@ -241,7 +241,7 @@ static int get_pw_uid(TALLOC_CTX *mem_ctx,
DEBUG(7, ("User %d does not exist (or is invalid) on remote server,"
" deleting!\n", uid));
- ret = sysdb_delete_user(tmpctx, sysdb, dom, NULL, uid);
+ ret = sysdb_delete_user(tmpctx, sysdb, NULL, uid);
if (ret) {
goto done;
}
@@ -352,7 +352,7 @@ again:
goto again; /* skip */
}
- ret = sysdb_store_user(tmpctx, sysdb, dom,
+ ret = sysdb_store_user(tmpctx, sysdb,
pwd->pw_name,
pwd->pw_passwd,
pwd->pw_uid,
@@ -515,7 +515,7 @@ again:
members = NULL;
}
- ret = sysdb_store_group(tmpctx, sysdb, dom,
+ ret = sysdb_store_group(tmpctx, sysdb,
grp->gr_name,
grp->gr_gid,
members,
@@ -666,7 +666,7 @@ again:
members = NULL;
}
- ret = sysdb_store_group(tmpctx, sysdb, dom,
+ ret = sysdb_store_group(tmpctx, sysdb,
grp->gr_name,
grp->gr_gid,
members,
@@ -691,7 +691,7 @@ again:
DEBUG(7, ("Group %d does not exist (or is invalid) on remote server,"
" deleting!\n", gid));
- ret = sysdb_delete_group(tmpctx, sysdb, dom, NULL, gid);
+ ret = sysdb_delete_group(tmpctx, sysdb, NULL, gid);
if (ret) {
goto done;
}
@@ -821,7 +821,7 @@ again:
members = NULL;
}
- ret = sysdb_store_group(tmpctx, sysdb, dom,
+ ret = sysdb_store_group(tmpctx, sysdb,
grp->gr_name,
grp->gr_gid,
members,
@@ -928,7 +928,7 @@ static int get_initgr(TALLOC_CTX *mem_ctx,
break;
}
- ret = sysdb_store_user(tmpctx, sysdb, dom,
+ ret = sysdb_store_user(tmpctx, sysdb,
pwd->pw_name,
pwd->pw_passwd,
pwd->pw_uid,
diff --git a/src/providers/proxy/proxy_netgroup.c b/src/providers/proxy/proxy_netgroup.c
index cdcb2a85..5af32ac7 100644
--- a/src/providers/proxy/proxy_netgroup.c
+++ b/src/providers/proxy/proxy_netgroup.c
@@ -118,7 +118,7 @@ errno_t get_netgroup(struct proxy_id_ctx *ctx,
goto done;
}
- ret = sysdb_add_netgroup(sysdb, dom, name, NULL, attrs,
+ ret = sysdb_add_netgroup(sysdb, name, NULL, attrs,
ctx->entry_cache_timeout);
if (ret != EOK) {
DEBUG(1, ("sysdb_add_netgroup failed.\n"));
diff --git a/src/providers/simple/simple_access.c b/src/providers/simple/simple_access.c
index e2fc0755..4b9c3139 100644
--- a/src/providers/simple/simple_access.c
+++ b/src/providers/simple/simple_access.c
@@ -105,7 +105,7 @@ errno_t simple_access_check(struct simple_ctx *ctx, const char *username,
goto done;
}
- ret = sysdb_search_user_by_name(tmp_ctx, ctx->sysdb, ctx->domain,
+ ret = sysdb_search_user_by_name(tmp_ctx, ctx->sysdb,
username, user_attrs, &msg);
if (ret != EOK) {
DEBUG(1, ("Could not look up username [%s]: [%d][%s]\n",
@@ -153,7 +153,7 @@ errno_t simple_access_check(struct simple_ctx *ctx, const char *username,
}
talloc_zfree(msg);
- ret = sysdb_search_group_by_gid(tmp_ctx, ctx->sysdb, ctx->domain,
+ ret = sysdb_search_group_by_gid(tmp_ctx, ctx->sysdb,
gid, group_attrs, &msg);
if (ret != EOK) {
DEBUG(1, ("Could not look up primary group [%lu]: [%d][%s]\n",