summaryrefslogtreecommitdiffstats
path: root/src/db
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-07 23:59:17 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:53:02 +0100
commit2ca23577d3a25aead24ba759a1f6f67ffc24decf (patch)
tree8651a1d54846d8a3ccfa52e66953982dd9727c67 /src/db
parent80c6afa474d8a1e0198832bddfe5da75a9818b29 (diff)
downloadsssd-2ca23577d3a25aead24ba759a1f6f67ffc24decf.tar.gz
sssd-2ca23577d3a25aead24ba759a1f6f67ffc24decf.tar.xz
sssd-2ca23577d3a25aead24ba759a1f6f67ffc24decf.zip
Add domain argument to sysdb_remove_attrs()
Diffstat (limited to 'src/db')
-rw-r--r--src/db/sysdb.h1
-rw-r--r--src/db/sysdb_ops.c13
-rw-r--r--src/db/sysdb_services.c3
-rw-r--r--src/db/sysdb_services.h1
4 files changed, 11 insertions, 7 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index 96bbb8d2f..6fc71e1c1 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -814,6 +814,7 @@ errno_t sysdb_set_enumerated(struct sysdb_ctx *sysdb,
bool enumerated);
errno_t sysdb_remove_attrs(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name,
enum sysdb_member_type type,
char **remove_attrs);
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 06e930e13..5e6f6fb0a 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -1582,7 +1582,7 @@ int sysdb_add_netgroup(struct sysdb_ctx *sysdb,
ret = sysdb_set_netgroup_attr(sysdb, domain, name, attrs, SYSDB_MOD_REP);
if (missing) {
- ret = sysdb_remove_attrs(sysdb, name,
+ ret = sysdb_remove_attrs(sysdb, domain, name,
SYSDB_MEMBER_NETGROUP,
missing);
if (ret != EOK) {
@@ -1742,7 +1742,7 @@ int sysdb_store_user(struct sysdb_ctx *sysdb,
if (ret != EOK) goto fail;
if (remove_attrs) {
- ret = sysdb_remove_attrs(sysdb, name,
+ ret = sysdb_remove_attrs(sysdb, domain, name,
SYSDB_MEMBER_USER,
remove_attrs);
if (ret != EOK) {
@@ -3070,6 +3070,7 @@ done:
}
errno_t sysdb_remove_attrs(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name,
enum sysdb_member_type type,
char **remove_attrs)
@@ -3086,19 +3087,19 @@ errno_t sysdb_remove_attrs(struct sysdb_ctx *sysdb,
switch(type) {
case SYSDB_MEMBER_USER:
- msg->dn = sysdb_user_dn(sysdb, msg, sysdb->domain, name);
+ msg->dn = sysdb_user_dn(sysdb, msg, domain, name);
break;
case SYSDB_MEMBER_GROUP:
- msg->dn = sysdb_group_dn(sysdb, msg, sysdb->domain, name);
+ msg->dn = sysdb_group_dn(sysdb, msg, domain, name);
break;
case SYSDB_MEMBER_NETGROUP:
- msg->dn = sysdb_netgroup_dn(sysdb, msg, sysdb->domain, name);
+ msg->dn = sysdb_netgroup_dn(sysdb, msg, domain, name);
break;
case SYSDB_MEMBER_SERVICE:
- msg->dn = sysdb_svc_dn(sysdb, msg, sysdb->domain->name, name);
+ msg->dn = sysdb_svc_dn(sysdb, msg, domain->name, name);
break;
}
if (!msg->dn) {
diff --git a/src/db/sysdb_services.c b/src/db/sysdb_services.c
index 368cdeb6b..2ac8d9a4e 100644
--- a/src/db/sysdb_services.c
+++ b/src/db/sysdb_services.c
@@ -170,6 +170,7 @@ done:
errno_t
sysdb_store_service(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *primary_name,
int port,
const char **aliases,
@@ -385,7 +386,7 @@ sysdb_store_service(struct sysdb_ctx *sysdb,
if (ret != EOK) goto done;
if (remove_attrs) {
- ret = sysdb_remove_attrs(sysdb, primary_name,
+ ret = sysdb_remove_attrs(sysdb, domain, primary_name,
SYSDB_MEMBER_SERVICE,
remove_attrs);
if (ret != EOK) {
diff --git a/src/db/sysdb_services.h b/src/db/sysdb_services.h
index 76ceb3cc3..467a65846 100644
--- a/src/db/sysdb_services.h
+++ b/src/db/sysdb_services.h
@@ -66,6 +66,7 @@ sysdb_enumservent(TALLOC_CTX *mem_ctx,
errno_t
sysdb_store_service(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *primary_name,
int port,
const char **aliases,