summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-07 21:43:20 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:53:01 +0100
commitdd7192379e5fc5bb852863e60ad4b6a20c5da183 (patch)
tree6178abc8f7f78fd3099d5b28360bacacb2616f69 /src
parent74ac1c2834cd8961ed9e7cadcfe28b113bffe4de (diff)
downloadsssd-dd7192379e5fc5bb852863e60ad4b6a20c5da183.tar.gz
sssd-dd7192379e5fc5bb852863e60ad4b6a20c5da183.tar.bz2
sssd-dd7192379e5fc5bb852863e60ad4b6a20c5da183.zip
Add domain argument to sysdb_store_custom()
Diffstat (limited to 'src')
-rw-r--r--src/db/sysdb.h1
-rw-r--r--src/db/sysdb_autofs.c2
-rw-r--r--src/db/sysdb_ops.c3
-rw-r--r--src/db/sysdb_ssh.c2
-rw-r--r--src/db/sysdb_sudo.c2
-rw-r--r--src/providers/ipa/ipa_hbac_common.c2
-rw-r--r--src/tests/sysdb-tests.c2
7 files changed, 8 insertions, 6 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index 687818dc..4d4d3bde 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -716,6 +716,7 @@ int sysdb_cache_auth(struct sysdb_ctx *sysdb,
time_t *_delayed_until);
int sysdb_store_custom(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *object_name,
const char *subtree_name,
struct sysdb_attrs *attrs);
diff --git a/src/db/sysdb_autofs.c b/src/db/sysdb_autofs.c
index 446b3cac..d07f1c63 100644
--- a/src/db/sysdb_autofs.c
+++ b/src/db/sysdb_autofs.c
@@ -142,7 +142,7 @@ sysdb_save_autofsmap(struct sysdb_ctx *sysdb_ctx,
goto done;
}
- ret = sysdb_store_custom(sysdb_ctx, name, AUTOFS_MAP_SUBDIR, attrs);
+ ret = sysdb_store_custom(sysdb_ctx, sysdb_ctx->domain, name, AUTOFS_MAP_SUBDIR, attrs);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE, ("sysdb_store_custom failed [%d]: %s\n",
ret, strerror(ret)));
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 6ff10d7d..386f94b3 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -2099,6 +2099,7 @@ done:
/* =Custom Store (replaces-existing-data)================== */
int sysdb_store_custom(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *object_name,
const char *subtree_name,
struct sysdb_attrs *attrs)
@@ -2146,7 +2147,7 @@ int sysdb_store_custom(struct sysdb_ctx *sysdb,
}
msg->dn = sysdb_custom_dn(sysdb, tmp_ctx,
- sysdb->domain, object_name, subtree_name);
+ domain, object_name, subtree_name);
if (!msg->dn) {
DEBUG(1, ("sysdb_custom_dn failed.\n"));
ret = ENOMEM;
diff --git a/src/db/sysdb_ssh.c b/src/db/sysdb_ssh.c
index 2f193a5c..c3e42143 100644
--- a/src/db/sysdb_ssh.c
+++ b/src/db/sysdb_ssh.c
@@ -30,7 +30,7 @@ sysdb_update_ssh_host(struct sysdb_ctx *sysdb,
{
errno_t ret;
- ret = sysdb_store_custom(sysdb, name, SSH_HOSTS_SUBDIR, attrs);
+ ret = sysdb_store_custom(sysdb, sysdb->domain, name, SSH_HOSTS_SUBDIR, attrs);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
("Error storing host %s [%d]: %s\n", name, ret, strerror(ret)));
diff --git a/src/db/sysdb_sudo.c b/src/db/sysdb_sudo.c
index 2e0738eb..beb8e5e1 100644
--- a/src/db/sysdb_sudo.c
+++ b/src/db/sysdb_sudo.c
@@ -443,7 +443,7 @@ sysdb_save_sudorule(struct sysdb_ctx *sysdb_ctx,
return ret;
}
- ret = sysdb_store_custom(sysdb_ctx, rule_name, SUDORULE_SUBDIR, attrs);
+ ret = sysdb_store_custom(sysdb_ctx, sysdb_ctx->domain, rule_name, SUDORULE_SUBDIR, attrs);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE, ("sysdb_store_custom failed [%d]: %s\n",
ret, strerror(ret)));
diff --git a/src/providers/ipa/ipa_hbac_common.c b/src/providers/ipa/ipa_hbac_common.c
index 9ccab784..7fdb2ce6 100644
--- a/src/providers/ipa/ipa_hbac_common.c
+++ b/src/providers/ipa/ipa_hbac_common.c
@@ -77,7 +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(sysdb, object_name, subdir, list[c]);
+ ret = sysdb_store_custom(sysdb, domain, object_name, subdir, list[c]);
if (ret != EOK) {
DEBUG(1, ("sysdb_store_custom failed.\n"));
goto done;
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c
index a6a2b1d7..f08cf7ce 100644
--- a/src/tests/sysdb-tests.c
+++ b/src/tests/sysdb-tests.c
@@ -355,7 +355,7 @@ static int test_store_custom(struct test_data *data)
return ENOMEM;
}
- ret = sysdb_store_custom(data->ctx->sysdb, object_name,
+ ret = sysdb_store_custom(data->ctx->sysdb, data->ctx->domain, object_name,
CUSTOM_TEST_CONTAINER, data->attrs);
return ret;
}