diff options
author | Simo Sorce <simo@redhat.com> | 2013-01-07 17:09:16 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-01-15 10:49:20 +0100 |
commit | 3f94d6718d44185137e13b6d326dfd63e8dc61c6 (patch) | |
tree | 575f6c8f1e169b326fabceda2622e370794d2bb0 /src/providers | |
parent | e6f266656ead48452673389835125db7a1a34baf (diff) | |
download | sssd-3f94d6718d44185137e13b6d326dfd63e8dc61c6.tar.gz sssd-3f94d6718d44185137e13b6d326dfd63e8dc61c6.tar.xz sssd-3f94d6718d44185137e13b6d326dfd63e8dc61c6.zip |
Add domain argument to sysdb_set_user_attr()
Diffstat (limited to 'src/providers')
-rw-r--r-- | src/providers/krb5/krb5_auth.c | 13 | ||||
-rw-r--r-- | src/providers/ldap/sdap_access.c | 1 | ||||
-rw-r--r-- | src/providers/ldap/sdap_async_groups.c | 10 |
3 files changed, 16 insertions, 8 deletions
diff --git a/src/providers/krb5/krb5_auth.c b/src/providers/krb5/krb5_auth.c index f03cfcf4..00f5c339 100644 --- a/src/providers/krb5/krb5_auth.c +++ b/src/providers/krb5/krb5_auth.c @@ -118,6 +118,7 @@ check_old_ccache(const char *old_ccache, struct krb5child_req *kr, 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) @@ -166,7 +167,7 @@ static int krb5_mod_ccname(TALLOC_CTX *mem_ctx, } in_transaction = true; - ret = sysdb_set_user_attr(sysdb, name, attrs, mod_op); + ret = sysdb_set_user_attr(sysdb, domain, name, attrs, mod_op); if (ret != EOK) { DEBUG(6, ("Error: %d (%s)\n", ret, strerror(ret))); goto done; @@ -192,19 +193,21 @@ 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, name, ccname, + return krb5_mod_ccname(mem_ctx, sysdb, domain, 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, name, ccname, + return krb5_mod_ccname(mem_ctx, sysdb, domain, name, ccname, SYSDB_MOD_DEL); } @@ -945,7 +948,7 @@ static void krb5_auth_done(struct tevent_req *subreq) "please remove it manually.\n", kr->old_ccname)); } - ret = krb5_delete_ccname(state, state->sysdb, + ret = krb5_delete_ccname(state, state->sysdb, state->domain, pd->user, kr->old_ccname); if (ret != EOK) { DEBUG(1, ("krb5_delete_ccname failed.\n")); @@ -1048,7 +1051,7 @@ static void krb5_auth_done(struct tevent_req *subreq) "please remove it manually.\n", kr->old_ccname)); } - ret = krb5_save_ccname(state, state->sysdb, + ret = krb5_save_ccname(state, state->sysdb, state->domain, pd->user, store_ccname); if (ret) { DEBUG(1, ("krb5_save_ccname failed.\n")); diff --git a/src/providers/ldap/sdap_access.c b/src/providers/ldap/sdap_access.c index a0d4443f..a703f8b0 100644 --- a/src/providers/ldap/sdap_access.c +++ b/src/providers/ldap/sdap_access.c @@ -1061,6 +1061,7 @@ static void sdap_access_filter_get_access_done(struct tevent_req *subreq) } ret = sysdb_set_user_attr(state->be_req->sysdb, + state->be_req->domain, state->username, attrs, SYSDB_MOD_REP); if (ret != EOK) { diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c index c4957fb1..cdb60819 100644 --- a/src/providers/ldap/sdap_async_groups.c +++ b/src/providers/ldap/sdap_async_groups.c @@ -1810,6 +1810,7 @@ static void sdap_get_groups_done(struct tevent_req *subreq) static errno_t sdap_nested_group_populate_users(TALLOC_CTX *mem_ctx, struct sysdb_ctx *sysdb, + struct sss_domain_info *domain, struct sdap_options *opts, struct sysdb_attrs **users, int num_users, @@ -1866,7 +1867,7 @@ static void sdap_ad_match_rule_members_process(struct tevent_req *subreq) /* Figure out which users are already cached in the sysdb and * which ones need to be added as ghost users. */ - ret = sdap_nested_group_populate_users(tmp_ctx, state->sysdb, + ret = sdap_nested_group_populate_users(tmp_ctx, state->sysdb, state->dom, state->opts, users, count, &ghosts); if (ret != EOK) { @@ -2022,7 +2023,8 @@ static void sdap_nested_done(struct tevent_req *subreq) } in_transaction = true; - ret = sdap_nested_group_populate_users(state, state->sysdb, state->opts, + ret = sdap_nested_group_populate_users(state, state->sysdb, + state->dom, state->opts, users, user_count, &ghosts); if (ret != EOK) { goto fail; @@ -2058,6 +2060,7 @@ fail: static errno_t sdap_nested_group_populate_users(TALLOC_CTX *mem_ctx, struct sysdb_ctx *sysdb, + struct sss_domain_info *domain, struct sdap_options *opts, struct sysdb_attrs **users, int num_users, @@ -2171,7 +2174,8 @@ static errno_t sdap_nested_group_populate_users(TALLOC_CTX *mem_ctx, ret = sysdb_attrs_add_string(attrs, SYSDB_NAME, username); if (ret) goto done; - ret = sysdb_set_user_attr(sysdb, sysdb_name, attrs, SYSDB_MOD_REP); + ret = sysdb_set_user_attr(sysdb, domain, sysdb_name, + attrs, SYSDB_MOD_REP); if (ret != EOK) goto done; } else { key.type = HASH_KEY_STRING; |