From 20d2466dbce2bb950813e3f739bc40b511020efb Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 7 Jan 2013 17:16:45 -0500 Subject: Add domain argument to sysdb_set_group_attr() --- src/db/sysdb.h | 1 + src/db/sysdb_ops.c | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/db') diff --git a/src/db/sysdb.h b/src/db/sysdb.h index 2b514ddc..e96bc5a3 100644 --- a/src/db/sysdb.h +++ b/src/db/sysdb.h @@ -582,6 +582,7 @@ int sysdb_set_user_attr(struct sysdb_ctx *sysdb, /* Replace group attrs */ int sysdb_set_group_attr(struct sysdb_ctx *sysdb, + struct sss_domain_info *domain, const char *name, struct sysdb_attrs *attrs, int mod_op); diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c index fba10277..80dd3e08 100644 --- a/src/db/sysdb_ops.c +++ b/src/db/sysdb_ops.c @@ -584,6 +584,7 @@ done: /* =Replace-Attributes-On-Group=========================================== */ int sysdb_set_group_attr(struct sysdb_ctx *sysdb, + struct sss_domain_info *domain, const char *name, struct sysdb_attrs *attrs, int mod_op) @@ -598,7 +599,7 @@ int sysdb_set_group_attr(struct sysdb_ctx *sysdb, goto done; } - dn = sysdb_group_dn(sysdb, tmp_ctx, sysdb->domain, name); + dn = sysdb_group_dn(sysdb, tmp_ctx, domain, name); if (!dn) { ret = ENOMEM; goto done; @@ -1361,7 +1362,7 @@ int sysdb_add_group(struct sysdb_ctx *sysdb, (now + cache_timeout) : 0)); if (ret) goto done; - ret = sysdb_set_group_attr(sysdb, name, attrs, SYSDB_MOD_REP); + ret = sysdb_set_group_attr(sysdb, domain, name, attrs, SYSDB_MOD_REP); done: if (ret == EOK) { @@ -1420,7 +1421,7 @@ int sysdb_add_incomplete_group(struct sysdb_ctx *sysdb, if (ret) goto done; } - ret = sysdb_set_group_attr(sysdb, name, attrs, SYSDB_MOD_REP); + ret = sysdb_set_group_attr(sysdb, sysdb->domain, name, attrs, SYSDB_MOD_REP); done: if (ret != EOK) { @@ -1853,7 +1854,7 @@ int sysdb_store_group(struct sysdb_ctx *sysdb, (now + cache_timeout) : 0)); if (ret) goto done; - ret = sysdb_set_group_attr(sysdb, name, attrs, SYSDB_MOD_REP); + ret = sysdb_set_group_attr(sysdb, sysdb->domain, name, attrs, SYSDB_MOD_REP); done: if (ret) { -- cgit