URL: https://github.com/SSSD/sssd/pull/109 Author: justin-stephenson Title: #109: SSSCTL: fix netgroup-show parsing Action: opened
PR body: """ the ldb Name attribute is not fully-qualified for netgroups like it is for user and group objects, sssctl should skip sss_output_name() for netgroup entries. Resolves: https://fedorahosted.org/sssd/ticket/3267 -- Reproduced easily by adding a netgroup(in IDM or otherwise), getent netgroup <netgroupname>, sssctl netgroup-show <netgroupname> """ To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/109/head:pr109 git checkout pr109
From c0668baf90d4c44dff13cec634c0e8241ce3c344 Mon Sep 17 00:00:00 2001 From: Justin Stephenson <[email protected]> Date: Tue, 13 Dec 2016 22:12:28 -0500 Subject: [PATCH] SSSCTL: fix netgroup-show parsing the ldb Name attribute is not fully-qualified for netgroups like it is for user and group objects, sssctl should skip sss_output_name() for netgroup entries. Resolves: https://fedorahosted.org/sssd/ticket/3267 --- src/tools/sssctl/sssctl_cache.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tools/sssctl/sssctl_cache.c b/src/tools/sssctl/sssctl_cache.c index b1a7cc9..7dd9061 100644 --- a/src/tools/sssctl/sssctl_cache.c +++ b/src/tools/sssctl/sssctl_cache.c @@ -103,7 +103,12 @@ static errno_t attr_name(TALLOC_CTX *mem_ctx, return ret; } - tmp_name = sss_output_name(mem_ctx, orig_name, dom->case_preserve, 0); + if (strchr(orig_name, '@') == NULL) { + tmp_name = orig_name; + } else { + tmp_name = sss_output_name(mem_ctx, orig_name, dom->case_preserve, 0); + } + if (tmp_name == NULL) { return ENOMEM; }
_______________________________________________ sssd-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
