summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-09-21 23:41:42 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-09-24 18:23:15 +0200
commit95f5e7963a36b7b68859ce91ae4b232088bbaa09 (patch)
treeb5216b8dc726d1539d9960a43957cb9da2e1ebd1 /src/tools
parent77f445dbaecc8e792e1ad42e3742800ad141bee0 (diff)
downloadsssd-95f5e7963a36b7b68859ce91ae4b232088bbaa09.tar.gz
sssd-95f5e7963a36b7b68859ce91ae4b232088bbaa09.tar.xz
sssd-95f5e7963a36b7b68859ce91ae4b232088bbaa09.zip
SYSDB: Remove unnecessary domain parameter from several sysdb calls
The domain can be read from the sysdb object. Removing the domain string makes the API more self-contained.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/sss_groupshow.c2
-rw-r--r--src/tools/sss_sync_ops.c17
2 files changed, 6 insertions, 13 deletions
diff --git a/src/tools/sss_groupshow.c b/src/tools/sss_groupshow.c
index 1bc5d3086..2ba495c19 100644
--- a/src/tools/sss_groupshow.c
+++ b/src/tools/sss_groupshow.c
@@ -423,7 +423,7 @@ static int group_show_trim_memberof(TALLOC_CTX *mem_ctx,
int ret;
int i;
- dn = sysdb_group_dn(sysdb, mem_ctx, domain->name, name);
+ dn = sysdb_group_dn(sysdb, mem_ctx, name);
if (!dn) {
return ENOMEM;
}
diff --git a/src/tools/sss_sync_ops.c b/src/tools/sss_sync_ops.c
index 380e61275..7183eb3e6 100644
--- a/src/tools/sss_sync_ops.c
+++ b/src/tools/sss_sync_ops.c
@@ -61,7 +61,6 @@ static int mod_groups_member(struct sysdb_ctx *sysdb,
struct ldb_dn *parent_dn;
int ret;
int i;
- struct sss_domain_info *domain = sysdb_ctx_get_domain(sysdb);
tmpctx = talloc_new(NULL);
if (!tmpctx) {
@@ -72,7 +71,6 @@ static int mod_groups_member(struct sysdb_ctx *sysdb,
for (i = 0; grouplist[i]; i++) {
parent_dn = sysdb_group_dn(sysdb, tmpctx,
- domain->name,
grouplist[i]);
if (!parent_dn) {
ret = ENOMEM;
@@ -201,8 +199,7 @@ int usermod(TALLOC_CTX *mem_ctx,
int ret;
if (data->addgroups || data->rmgroups) {
- member_dn = sysdb_user_dn(sysdb, mem_ctx,
- data->domain->name, data->name);
+ member_dn = sysdb_user_dn(sysdb, mem_ctx, data->name);
if (!member_dn) {
return ENOMEM;
}
@@ -259,8 +256,7 @@ int groupmod(TALLOC_CTX *mem_ctx,
int ret;
if (data->addgroups || data->rmgroups) {
- member_dn = sysdb_group_dn(sysdb, mem_ctx,
- data->domain->name, data->name);
+ member_dn = sysdb_group_dn(sysdb, mem_ctx, data->name);
if (!member_dn) {
return ENOMEM;
}
@@ -479,8 +475,7 @@ int useradd(TALLOC_CTX *mem_ctx,
if (data->addgroups) {
struct ldb_dn *member_dn;
- member_dn = sysdb_user_dn(sysdb, mem_ctx,
- data->domain->name, data->name);
+ member_dn = sysdb_user_dn(sysdb, mem_ctx, data->name);
if (!member_dn) {
ret = ENOMEM;
goto done;
@@ -509,8 +504,7 @@ int userdel(TALLOC_CTX *mem_ctx,
struct ldb_dn *user_dn;
int ret;
- user_dn = sysdb_user_dn(sysdb, mem_ctx,
- data->domain->name, data->name);
+ user_dn = sysdb_user_dn(sysdb, mem_ctx, data->name);
if (!user_dn) {
DEBUG(1, ("Could not construct a user DN\n"));
return ENOMEM;
@@ -552,8 +546,7 @@ int groupdel(TALLOC_CTX *mem_ctx,
struct ldb_dn *group_dn;
int ret;
- group_dn = sysdb_group_dn(sysdb, mem_ctx,
- data->domain->name, data->name);
+ group_dn = sysdb_group_dn(sysdb, mem_ctx, data->name);
if (group_dn == NULL) {
DEBUG(1, ("Could not construct a group DN\n"));
return ENOMEM;