summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_sudo.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-08 01:25:47 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:53:03 +0100
commitb0fa48b0d612b46a86e45f8e4b5d9feae9784c2b (patch)
tree8df34df06567f926284a27b775fb923b39bc4a6d /src/providers/ldap/sdap_sudo.c
parent965428847850f1b154130e249f2d942c6065e88d (diff)
downloadsssd-b0fa48b0d612b46a86e45f8e4b5d9feae9784c2b.tar.gz
sssd-b0fa48b0d612b46a86e45f8e4b5d9feae9784c2b.tar.xz
sssd-b0fa48b0d612b46a86e45f8e4b5d9feae9784c2b.zip
Add domain arguments to sysdb sudo functions
Diffstat (limited to 'src/providers/ldap/sdap_sudo.c')
-rw-r--r--src/providers/ldap/sdap_sudo.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_sudo.c b/src/providers/ldap/sdap_sudo.c
index de16a84c0..990eed1ad 100644
--- a/src/providers/ldap/sdap_sudo.c
+++ b/src/providers/ldap/sdap_sudo.c
@@ -36,6 +36,7 @@ struct sdap_sudo_full_refresh_state {
struct sdap_sudo_ctx *sudo_ctx;
struct sdap_id_ctx *id_ctx;
struct sysdb_ctx *sysdb;
+ struct sss_domain_info *domain;
int dp_error;
int error;
};
@@ -250,7 +251,9 @@ static int sdap_sudo_setup_periodical_refresh(struct sdap_sudo_ctx *sudo_ctx)
}
}
- ret = sysdb_sudo_get_last_full_refresh(id_ctx->be->sysdb, &last_full);
+ ret = sysdb_sudo_get_last_full_refresh(id_ctx->be->sysdb,
+ id_ctx->be->domain,
+ &last_full);
if (ret != EOK) {
return ret;
}
@@ -553,6 +556,7 @@ static struct tevent_req *sdap_sudo_full_refresh_send(TALLOC_CTX *mem_ctx,
state->sudo_ctx = sudo_ctx;
state->id_ctx = id_ctx;
state->sysdb = id_ctx->be->sysdb;
+ state->domain = id_ctx->be->domain;
/* Download all rules from LDAP */
ldap_filter = talloc_asprintf(state, SDAP_SUDO_FILTER_CLASS,
@@ -627,7 +631,8 @@ static void sdap_sudo_full_refresh_done(struct tevent_req *subreq)
state->sudo_ctx->full_refresh_done = true;
/* save the time in the sysdb */
- ret = sysdb_sudo_set_last_full_refresh(state->sysdb, time(NULL));
+ ret = sysdb_sudo_set_last_full_refresh(state->sysdb, state->domain,
+ time(NULL));
if (ret != EOK) {
DEBUG(SSSDBG_MINOR_FAILURE, ("Unable to save time of "
"a successful full refresh\n"));