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/tools | |
parent | e6f266656ead48452673389835125db7a1a34baf (diff) | |
download | sssd-3f94d6718d44185137e13b6d326dfd63e8dc61c6.tar.gz sssd-3f94d6718d44185137e13b6d326dfd63e8dc61c6.tar.bz2 sssd-3f94d6718d44185137e13b6d326dfd63e8dc61c6.zip |
Add domain argument to sysdb_set_user_attr()
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/sss_cache.c | 14 | ||||
-rw-r--r-- | src/tools/sss_sync_ops.c | 3 |
2 files changed, 10 insertions, 7 deletions
diff --git a/src/tools/sss_cache.c b/src/tools/sss_cache.c index 3de12237..b8f0f266 100644 --- a/src/tools/sss_cache.c +++ b/src/tools/sss_cache.c @@ -76,8 +76,9 @@ struct cache_tool_ctx { errno_t init_domains(struct cache_tool_ctx *ctx, const char *domain); errno_t init_context(int argc, const char *argv[], struct cache_tool_ctx **tctx); -errno_t invalidate_entry(TALLOC_CTX *ctx, struct sysdb_ctx *sysdb, - const char *name, int entry_type); +static errno_t invalidate_entry(TALLOC_CTX *ctx, struct sysdb_ctx *sysdb, + struct sss_domain_info *domain, + const char *name, int entry_type); static bool invalidate_entries(TALLOC_CTX *ctx, struct sss_domain_info *dinfo, struct sysdb_ctx *sysdb, @@ -333,7 +334,7 @@ static bool invalidate_entries(TALLOC_CTX *ctx, ERROR("Couldn't invalidate %1$s", type_string); iret = false; } else { - ret = invalidate_entry(ctx, sysdb, c_name, entry_type); + ret = invalidate_entry(ctx, sysdb, dinfo, c_name, entry_type); if (ret != EOK) { DEBUG(SSSDBG_MINOR_FAILURE, ("Couldn't invalidate %s %s", type_string, c_name)); @@ -346,8 +347,9 @@ static bool invalidate_entries(TALLOC_CTX *ctx, return iret; } -errno_t invalidate_entry(TALLOC_CTX *ctx, struct sysdb_ctx *sysdb, - const char *name, int entry_type) +static errno_t invalidate_entry(TALLOC_CTX *ctx, struct sysdb_ctx *sysdb, + struct sss_domain_info *domain, + const char *name, int entry_type) { struct sysdb_attrs *sys_attrs = NULL; errno_t ret; @@ -359,7 +361,7 @@ errno_t invalidate_entry(TALLOC_CTX *ctx, struct sysdb_ctx *sysdb, if (ret == EOK) { switch (entry_type) { case TYPE_USER: - ret = sysdb_set_user_attr(sysdb, name, sys_attrs, + ret = sysdb_set_user_attr(sysdb, domain, name, sys_attrs, SYSDB_MOD_REP); break; case TYPE_GROUP: diff --git a/src/tools/sss_sync_ops.c b/src/tools/sss_sync_ops.c index f5d496b5..d6f447e7 100644 --- a/src/tools/sss_sync_ops.c +++ b/src/tools/sss_sync_ops.c @@ -218,7 +218,8 @@ int usermod(TALLOC_CTX *mem_ctx, } if (attrs->num != 0) { - ret = sysdb_set_user_attr(sysdb, data->name, attrs, SYSDB_MOD_REP); + ret = sysdb_set_user_attr(sysdb, data->domain, data->name, + attrs, SYSDB_MOD_REP); if (ret) { return ret; } |