summaryrefslogtreecommitdiff
path: root/src/db
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-07 19:44:29 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:53:01 +0100
commitb7427d63bd328be32991f9d437c4a3d46bcabe03 (patch)
tree1b232e469a99cdeb2f3ac00c9ee5997dd2e6d03f /src/db
parent5c1135221ff3ea9132b6ebf073f2dcae88b73b3f (diff)
downloadsssd-b7427d63bd328be32991f9d437c4a3d46bcabe03.tar.gz
sssd-b7427d63bd328be32991f9d437c4a3d46bcabe03.tar.bz2
sssd-b7427d63bd328be32991f9d437c4a3d46bcabe03.zip
Add domain arguments to sysdb_add_inetgroup fns.
Diffstat (limited to 'src/db')
-rw-r--r--src/db/sysdb.h2
-rw-r--r--src/db/sysdb_ops.c8
2 files changed, 7 insertions, 3 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index dccd0450..392746c8 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -643,9 +643,11 @@ int sysdb_add_incomplete_group(struct sysdb_ctx *sysdb,
/* Add netgroup (only basic attrs and w/o checks) */
int sysdb_add_basic_netgroup(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name, const char *description);
int sysdb_add_netgroup(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name,
const char *description,
struct sysdb_attrs *attrs,
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 33c6ac04..0b6951a6 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -1482,6 +1482,7 @@ fail:
/* =Add-Basic-Netgroup-NO-CHECKS============================================= */
int sysdb_add_basic_netgroup(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name, const char *description)
{
struct ldb_message *msg;
@@ -1493,7 +1494,7 @@ int sysdb_add_basic_netgroup(struct sysdb_ctx *sysdb,
}
/* netgroup dn */
- msg->dn = sysdb_netgroup_dn(sysdb, msg, sysdb->domain, name);
+ msg->dn = sysdb_netgroup_dn(sysdb, msg, domain, name);
if (!msg->dn) {
ERROR_OUT(ret, ENOMEM, done);
}
@@ -1531,6 +1532,7 @@ done:
/* =Add-Netgroup-Function==================================================== */
int sysdb_add_netgroup(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name,
const char *description,
struct sysdb_attrs *attrs,
@@ -1554,7 +1556,7 @@ int sysdb_add_netgroup(struct sysdb_ctx *sysdb,
}
/* try to add the netgroup */
- ret = sysdb_add_basic_netgroup(sysdb, name, description);
+ ret = sysdb_add_basic_netgroup(sysdb, domain, name, description);
if (ret && ret != EEXIST) goto done;
if (!attrs) {
@@ -1577,7 +1579,7 @@ int sysdb_add_netgroup(struct sysdb_ctx *sysdb,
(now + cache_timeout) : 0));
if (ret) goto done;
- ret = sysdb_set_netgroup_attr(sysdb, sysdb->domain, name, attrs, SYSDB_MOD_REP);
+ ret = sysdb_set_netgroup_attr(sysdb, domain, name, attrs, SYSDB_MOD_REP);
if (missing) {
ret = sysdb_remove_attrs(sysdb, name,