summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/sss_groupshow.c9
-rw-r--r--src/tools/sss_seed.c14
2 files changed, 19 insertions, 4 deletions
diff --git a/src/tools/sss_groupshow.c b/src/tools/sss_groupshow.c
index 41d7475ce..3743a568f 100644
--- a/src/tools/sss_groupshow.c
+++ b/src/tools/sss_groupshow.c
@@ -318,7 +318,7 @@ int group_show(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
struct sss_domain_info *domain,
bool recursive,
- const char *name,
+ const char *internal_fqname,
struct group_info **res)
{
struct group_info *root;
@@ -330,7 +330,8 @@ int group_show(TALLOC_CTX *mem_ctx,
int i;
/* First, search for the root group */
- ret = sysdb_search_group_by_name(mem_ctx, domain, name, attrs, &msg);
+ ret = sysdb_search_group_by_name(mem_ctx, domain, internal_fqname,
+ attrs, &msg);
if (ret) {
DEBUG(SSSDBG_OP_FAILURE,
"Search failed: %s (%d)\n", strerror(ret), ret);
@@ -408,7 +409,7 @@ done:
static int group_show_trim_memberof(TALLOC_CTX *mem_ctx,
struct sss_domain_info *domain,
- const char *name,
+ const char *name, /* internal fqname */
const char **memberofs,
const char ***_direct)
{
@@ -478,7 +479,7 @@ int group_show_recurse(TALLOC_CTX *mem_ctx,
struct sss_domain_info *domain,
struct group_info *root,
struct group_info *parent,
- const char **group_members,
+ const char **group_members, /* internal fq format */
const int nmembers,
struct group_info ***up_members)
{
diff --git a/src/tools/sss_seed.c b/src/tools/sss_seed.c
index 2cd6a57aa..e45bbcc6e 100644
--- a/src/tools/sss_seed.c
+++ b/src/tools/sss_seed.c
@@ -729,6 +729,19 @@ static int seed_cache_user(struct seed_ctx *sctx)
bool in_transaction = false;
int ret = EOK;
errno_t sret;
+ char *name;
+ TALLOC_CTX *tmp_ctx;
+
+ tmp_ctx = talloc_new(NULL);
+ if (tmp_ctx == NULL) {
+ return ENOMEM;
+ }
+
+ name = sss_ioname2internal(tmp_ctx, sctx->domain, sctx->uctx->name);
+ if (name == NULL) {
+ ret = ENOMEM;
+ goto done;
+ }
ret = sysdb_transaction_start(sctx->sysdb);
if (ret != EOK) {
@@ -777,6 +790,7 @@ done:
}
}
+ talloc_free(tmp_ctx);
return ret;
}