summaryrefslogtreecommitdiff
path: root/src/responder/sudo
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-07 22:15:14 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:53:01 +0100
commit770896b194b7b66b09c2a30545b4d091fd86b1f4 (patch)
treec2cbe2a448060e73cba6d92bbbe4c191cb20a210 /src/responder/sudo
parentdd7192379e5fc5bb852863e60ad4b6a20c5da183 (diff)
downloadsssd-770896b194b7b66b09c2a30545b4d091fd86b1f4.tar.gz
sssd-770896b194b7b66b09c2a30545b4d091fd86b1f4.tar.bz2
sssd-770896b194b7b66b09c2a30545b4d091fd86b1f4.zip
Add domain argument to sysdb_search_custom()
Also changes sysdb_search_custom_by_name()
Diffstat (limited to 'src/responder/sudo')
-rw-r--r--src/responder/sudo/sudosrv_get_sudorules.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/responder/sudo/sudosrv_get_sudorules.c b/src/responder/sudo/sudosrv_get_sudorules.c
index ac8cb3ce..4860d878 100644
--- a/src/responder/sudo/sudosrv_get_sudorules.c
+++ b/src/responder/sudo/sudosrv_get_sudorules.c
@@ -329,6 +329,7 @@ sudosrv_dp_req_done(struct tevent_req *req);
static errno_t sudosrv_get_sudorules_query_cache(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
enum sss_dp_sudo_type type,
const char **attrs,
unsigned int flags,
@@ -410,7 +411,8 @@ errno_t sudosrv_get_rules(struct sudo_cmd_ctx *cmd_ctx)
| SYSDB_SUDO_FILTER_INCLUDE_DFL
| SYSDB_SUDO_FILTER_ONLY_EXPIRED
| SYSDB_SUDO_FILTER_USERINFO;
- ret = sudosrv_get_sudorules_query_cache(tmp_ctx, rules_sysdb, cmd_ctx->type,
+ ret = sudosrv_get_sudorules_query_cache(tmp_ctx, rules_sysdb,
+ cmd_ctx->domain, cmd_ctx->type,
attrs, flags, cmd_ctx->orig_username,
cmd_ctx->uid, groupnames,
&expired_rules, &expired_rules_num);
@@ -632,7 +634,8 @@ static errno_t sudosrv_get_sudorules_from_cache(TALLOC_CTX *mem_ctx,
break;
}
- ret = sudosrv_get_sudorules_query_cache(tmp_ctx, rules_sysdb, cmd_ctx->type,
+ ret = sudosrv_get_sudorules_query_cache(tmp_ctx, rules_sysdb,
+ cmd_ctx->domain, cmd_ctx->type,
attrs, flags, cmd_ctx->orig_username,
cmd_ctx->uid, groupnames,
&rules, &num_rules);
@@ -664,6 +667,7 @@ sort_sudo_rules(struct sysdb_attrs **rules, size_t count);
static errno_t sudosrv_get_sudorules_query_cache(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
enum sss_dp_sudo_type type,
const char **attrs,
unsigned int flags,
@@ -694,7 +698,7 @@ static errno_t sudosrv_get_sudorules_query_cache(TALLOC_CTX *mem_ctx,
DEBUG(SSSDBG_FUNC_DATA, ("Searching sysdb with [%s]\n", filter));
- ret = sysdb_search_custom(tmp_ctx, sysdb, filter,
+ ret = sysdb_search_custom(tmp_ctx, sysdb, domain, filter,
SUDORULE_SUBDIR, attrs,
&count, &msgs);
if (ret != EOK && ret != ENOENT) {