On Fri, Aug 12, 2016 at 02:38:44PM +0200, Lukas Slebodnik wrote: > On (12/08/16 14:13), Jakub Hrozek wrote: > >On Fri, Aug 12, 2016 at 01:47:04PM +0200, Lukas Slebodnik wrote: > >> On (12/08/16 07:39), Stephen Gallagher wrote: > >> >On 08/12/2016 07:30 AM, Lukas Slebodnik wrote: > >> >> On (12/08/16 13:24), Jakub Hrozek wrote: > >> >>> Hi, > >> >>> > >> >>> a simple one-liner is attached. > >> >> > >> >>>From c7bd0b7e695d031258ab47d8c425c9d5843d4069 Mon Sep 17 00:00:00 2001 > >> >>> From: Jakub Hrozek <jhro...@redhat.com> > >> >>> Date: Fri, 12 Aug 2016 13:23:16 +0200 > >> >>> Subject: [PATCH] CONFIG: full_name_format is an allowed option for all > >> >>> domains > >> >>> > >> >>> --- > >> >>> src/config/cfg_rules.ini | 1 + > >> >>> 1 file changed, 1 insertion(+) > >> >>> > >> >>> diff --git a/src/config/cfg_rules.ini b/src/config/cfg_rules.ini > >> >>> index > >> >>> 09f53fa41eb2904f11a78af333b6d79619d2759c..febe4289832f3778b7e974ef4e8b3f6d9d8bffd8 > >> >>> 100644 > >> >>> --- a/src/config/cfg_rules.ini > >> >>> +++ b/src/config/cfg_rules.ini > >> >>> @@ -287,6 +287,7 @@ option = subdomain_refresh_interval > >> >>> option = subdomain_inherit > >> >>> option = cached_auth_timeout > >> >>> option = wildcard_limit > >> >>> +option = full_name_format > >> >>> > >> >>> #Entry cache timeouts > >> >>> option = entry_cache_user_timeout > >> >> > >> >> Could you also update src/config/etc/sssd.api.* ? > >> >> > >> > > >> >Which will probably mean updating the SSSDConfigTest also. > >> > > >> I though it was implicit, becasue we reject patches which do not pass > >> unit+integration tests :-) > > > >Sure, see the attached patch. > > Thank you for a patch. > > I checked a source code and I noticed that we handle the option re_expression > in the same way (in function sss_names_init_from_args) > > Would you mind to prepare patch for re_expression? > > BTW both otions are properly documented in sssd.conf >
Sure, patches are attached.
>From 27bdb80ecb62a9c7d62d745c7524aa236f257979 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek <jhro...@redhat.com> Date: Fri, 12 Aug 2016 13:23:16 +0200 Subject: [PATCH 1/2] CONFIG: full_name_format is an allowed option for all domains --- src/config/SSSDConfig/__init__.py.in | 1 + src/config/SSSDConfigTest.py | 2 ++ src/config/cfg_rules.ini | 1 + src/config/etc/sssd.api.conf | 1 + 4 files changed, 5 insertions(+) diff --git a/src/config/SSSDConfig/__init__.py.in b/src/config/SSSDConfig/__init__.py.in index 7856c4c6b2d675b7f7f0f5f2048086044e8fb5ea..3114d1da9fe8e833ae4050ac343ba2763dc56e68 100644 --- a/src/config/SSSDConfig/__init__.py.in +++ b/src/config/SSSDConfig/__init__.py.in @@ -163,6 +163,7 @@ option_strings = { 'subdomain_refresh_interval' : _('How often should subdomains list be refreshed'), 'subdomain_inherit' : _('List of options that should be inherited into a subdomain'), 'cached_auth_timeout' : _('How long can cached credentials be used for cached authentication'), + 'full_name_format' : _('Printf-compatible format for displaying fully-qualified names'), # [provider/ipa] 'ipa_domain' : _('IPA domain'), diff --git a/src/config/SSSDConfigTest.py b/src/config/SSSDConfigTest.py index 332d8702d983b6ec8bf12ec781a1bbf296b552e0..bfb247ac45f752397000d43c54a20e57c6fbd9a5 100755 --- a/src/config/SSSDConfigTest.py +++ b/src/config/SSSDConfigTest.py @@ -560,6 +560,7 @@ class SSSDConfigTestSSSDDomain(unittest.TestCase): 'realmd_tags', 'subdomain_refresh_interval', 'subdomain_inherit', + 'full_name_format', 'cached_auth_timeout'] self.assertTrue(type(options) == dict, @@ -927,6 +928,7 @@ class SSSDConfigTestSSSDDomain(unittest.TestCase): 'realmd_tags', 'subdomain_refresh_interval', 'subdomain_inherit', + 'full_name_format', 'cached_auth_timeout'] self.assertTrue(type(options) == dict, diff --git a/src/config/cfg_rules.ini b/src/config/cfg_rules.ini index 09f53fa41eb2904f11a78af333b6d79619d2759c..febe4289832f3778b7e974ef4e8b3f6d9d8bffd8 100644 --- a/src/config/cfg_rules.ini +++ b/src/config/cfg_rules.ini @@ -287,6 +287,7 @@ option = subdomain_refresh_interval option = subdomain_inherit option = cached_auth_timeout option = wildcard_limit +option = full_name_format #Entry cache timeouts option = entry_cache_user_timeout diff --git a/src/config/etc/sssd.api.conf b/src/config/etc/sssd.api.conf index 737f0e149d56bd07b078cb83acbc43ea2ed3a057..2a43b8b68051c5133abc65a78f0d4a5561e760bd 100644 --- a/src/config/etc/sssd.api.conf +++ b/src/config/etc/sssd.api.conf @@ -147,6 +147,7 @@ realmd_tags = str, None, false subdomain_refresh_interval = int, None, false subdomain_inherit = str, None, false cached_auth_timeout = int, None, false +full_name_format = str, None, false #Entry cache timeouts entry_cache_user_timeout = int, None, false -- 2.4.11
>From 5c5e61e0baf3e9e984c1df3347e4178167edf583 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek <jhro...@redhat.com> Date: Fri, 12 Aug 2016 16:41:21 +0200 Subject: [PATCH 2/2] CONFIG: re_expression is an allowed option for all domains --- src/config/SSSDConfig/__init__.py.in | 1 + src/config/SSSDConfigTest.py | 2 ++ src/config/cfg_rules.ini | 1 + src/config/etc/sssd.api.conf | 1 + 4 files changed, 5 insertions(+) diff --git a/src/config/SSSDConfig/__init__.py.in b/src/config/SSSDConfig/__init__.py.in index 3114d1da9fe8e833ae4050ac343ba2763dc56e68..ac538788b9878dc2613cb48b7483d392cca41d47 100644 --- a/src/config/SSSDConfig/__init__.py.in +++ b/src/config/SSSDConfig/__init__.py.in @@ -164,6 +164,7 @@ option_strings = { 'subdomain_inherit' : _('List of options that should be inherited into a subdomain'), 'cached_auth_timeout' : _('How long can cached credentials be used for cached authentication'), 'full_name_format' : _('Printf-compatible format for displaying fully-qualified names'), + 're_expression' : _('Regex to parse username and domain'), # [provider/ipa] 'ipa_domain' : _('IPA domain'), diff --git a/src/config/SSSDConfigTest.py b/src/config/SSSDConfigTest.py index bfb247ac45f752397000d43c54a20e57c6fbd9a5..00c688f1e57c5f481d3adba2fe0374145216bc33 100755 --- a/src/config/SSSDConfigTest.py +++ b/src/config/SSSDConfigTest.py @@ -561,6 +561,7 @@ class SSSDConfigTestSSSDDomain(unittest.TestCase): 'subdomain_refresh_interval', 'subdomain_inherit', 'full_name_format', + 're_expression', 'cached_auth_timeout'] self.assertTrue(type(options) == dict, @@ -929,6 +930,7 @@ class SSSDConfigTestSSSDDomain(unittest.TestCase): 'subdomain_refresh_interval', 'subdomain_inherit', 'full_name_format', + 're_expression', 'cached_auth_timeout'] self.assertTrue(type(options) == dict, diff --git a/src/config/cfg_rules.ini b/src/config/cfg_rules.ini index febe4289832f3778b7e974ef4e8b3f6d9d8bffd8..bd0116f334e2605e7671a208225761421511a75a 100644 --- a/src/config/cfg_rules.ini +++ b/src/config/cfg_rules.ini @@ -288,6 +288,7 @@ option = subdomain_inherit option = cached_auth_timeout option = wildcard_limit option = full_name_format +option = re_expression #Entry cache timeouts option = entry_cache_user_timeout diff --git a/src/config/etc/sssd.api.conf b/src/config/etc/sssd.api.conf index 2a43b8b68051c5133abc65a78f0d4a5561e760bd..5ac6f79521f5f776fc17319c3afb87d44961afca 100644 --- a/src/config/etc/sssd.api.conf +++ b/src/config/etc/sssd.api.conf @@ -148,6 +148,7 @@ subdomain_refresh_interval = int, None, false subdomain_inherit = str, None, false cached_auth_timeout = int, None, false full_name_format = str, None, false +re_expression = str, None, false #Entry cache timeouts entry_cache_user_timeout = int, None, false -- 2.4.11
_______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/sssd-devel@lists.fedorahosted.org